Skip to content

Commit e747896

Browse files
committed
test: fix embedding test for Windows
1 parent bcdbf88 commit e747896

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

test/common/child_process.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
const assert = require('assert');
44
const { spawnSync, execFileSync } = require('child_process');
55
const common = require('./');
6+
const os = require('os');
67
const util = require('util');
78

89
// Workaround for Windows Server 2008R2
@@ -43,6 +44,9 @@ function logAfterTime(time) {
4344
}
4445

4546
function checkOutput(str, check) {
47+
if (common.isWindows && typeof str === 'string') {
48+
str = str.replaceAll(os.EOL, '\n');
49+
}
4650
if ((check instanceof RegExp && !check.test(str)) ||
4751
(typeof check === 'string' && check !== str)) {
4852
return { passed: false, reason: `did not match ${util.inspect(check)}` };

test/embedding/test-embedding.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -152,12 +152,6 @@ for (const extraSnapshotArgs of [
152152
{ cwd: tmpdir.path });
153153
}
154154

155-
// Skipping rest of the test on Windows because it fails in the CI
156-
// TODO(StefanStojanovic): Reenable rest of the test after fixing it
157-
if (common.isWindows) {
158-
return;
159-
}
160-
161155
// Guarantee NODE_REPL_EXTERNAL_MODULE won't bypass kDisableNodeOptionsEnv
162156
{
163157
spawnSyncAndExit(

0 commit comments

Comments
 (0)