Skip to content

Commit

Permalink
rollback changes to test/common/child_process.js
Browse files Browse the repository at this point in the history
  • Loading branch information
vmoroz committed Aug 11, 2024
1 parent 475e870 commit d8314e9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
8 changes: 0 additions & 8 deletions test/common/child_process.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
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 @@ -44,13 +43,6 @@ function logAfterTime(time) {
}

function checkOutput(str, check) {
if (common.isWindows && typeof str === 'string') {
// Normalize the line endings for the output and the check strings.
str = str.replaceAll(os.EOL, '\n');
if (typeof check === 'string') {
check = check.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
3 changes: 2 additions & 1 deletion test/embedding/test-embedding.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ const {
} = require('../common/child_process');
const path = require('path');
const fs = require('fs');
const os = require('os');

tmpdir.refresh();
common.allowGlobals(global.require);
Expand Down Expand Up @@ -166,6 +167,6 @@ for (const extraSnapshotArgs of [
{
status: 9,
signal: null,
stderr: `${binary}: NODE_REPL_EXTERNAL_MODULE can't be used with kDisableNodeOptionsEnv\n`,
stderr: `${binary}: NODE_REPL_EXTERNAL_MODULE can't be used with kDisableNodeOptionsEnv${os.EOL}`,
});
}

0 comments on commit d8314e9

Please sign in to comment.