Skip to content

Commit

Permalink
test: fix embedding test for Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
vmoroz committed Jul 12, 2024
1 parent bcdbf88 commit e747896
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
4 changes: 4 additions & 0 deletions test/common/child_process.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
const assert = require('assert');
const { spawnSync, execFileSync } = require('child_process');
const common = require('./');
const os = require('os');
const util = require('util');

// Workaround for Windows Server 2008R2
Expand Down Expand Up @@ -43,6 +44,9 @@ function logAfterTime(time) {
}

function checkOutput(str, check) {
if (common.isWindows && typeof str === 'string') {
str = str.replaceAll(os.EOL, '\n');
}
if ((check instanceof RegExp && !check.test(str)) ||
(typeof check === 'string' && check !== str)) {
return { passed: false, reason: `did not match ${util.inspect(check)}` };
Expand Down
6 changes: 0 additions & 6 deletions test/embedding/test-embedding.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,12 +152,6 @@ for (const extraSnapshotArgs of [
{ cwd: tmpdir.path });
}

// Skipping rest of the test on Windows because it fails in the CI
// TODO(StefanStojanovic): Reenable rest of the test after fixing it
if (common.isWindows) {
return;
}

// Guarantee NODE_REPL_EXTERNAL_MODULE won't bypass kDisableNodeOptionsEnv
{
spawnSyncAndExit(
Expand Down

0 comments on commit e747896

Please sign in to comment.