Skip to content

Commit

Permalink
fix: sea test on windows and mac
Browse files Browse the repository at this point in the history
  • Loading branch information
robertsLando committed Oct 23, 2024
1 parent 00c7c99 commit 10ca6d6
Showing 1 changed file with 18 additions and 3 deletions.
21 changes: 18 additions & 3 deletions test/test-00-sea/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,26 @@ utils.pkg.sync([input, '--sea'], { stdio: 'inherit' });

// try to spawn one file based on the platform
if (process.platform === 'linux') {
assert(utils.spawn.sync('./test-sea-linux', []), 'Hello world');
assert.equal(
utils.spawn.sync('./test-sea-linux', []),
'Hello world\n',
'Output matches',
);
} else if (process.platform === 'darwin') {
assert(utils.spawn.sync('./test-sea-macos', []), 'Hello world');
// FIXME: not working, needs investigation
assert.equal(
utils.spawn.sync('./test-sea-macos', []),
'Hello world\n',
'Output matches',
);
} else if (process.platform === 'win32') {
assert(utils.spawn.sync('./test-sea-win.exe', []), 'Hello world');
assert.equal(
utils.spawn.sync('./test-sea-win.exe', []),
'Hello world\n',
'Output matches',
);
// fix Error: EBUSY: resource busy or locked
utils.pause(1000);
}

utils.filesAfter(before, newcomers);

0 comments on commit 10ca6d6

Please sign in to comment.