Skip to content

Commit b7898d5

Browse files
committed
fix: update file existence check to handle platform-specific executable names
1 parent 8096a62 commit b7898d5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

nx-node-sea-e2e/src/nx-node-sea.spec.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { inspect } from 'node:util';
66
import { NxJsonConfiguration, readJsonFile, writeJsonFile } from '@nx/devkit';
77

88
import type { NodeSeaPluginOptions, NodeSeaOptions } from 'nx-node-sea';
9+
import { platform } from 'node:process';
910

1011
describe('nx-node-sea', () => {
1112
let projectDirectory: string;
@@ -60,7 +61,7 @@ describe('nx-node-sea', () => {
6061
const outputDirectory = join(projectDirectory, dirname(seaConfig.output));
6162
const files = readdirSync(outputDirectory);
6263
expect(files).toContain(basename(seaConfig.output));
63-
expect(files).toContain(expect.stringContaining('node'));
64+
expect(files).toContain(platform === 'win32' ? 'node.exe' : 'node');
6465
}, 45_000);
6566

6667
it.todo('should run the SEA');

0 commit comments

Comments
 (0)