summaryrefslogtreecommitdiff
path: root/tests/node_compat/test/parallel/test-child-process-exit-code.js
diff options
context:
space:
mode:
authorNathan Whitaker <17734409+nathanwhit@users.noreply.github.com>2024-07-23 20:12:08 -0700
committerGitHub <noreply@github.com>2024-07-24 03:12:08 +0000
commit29934d558c188fdc3406706da19921ca5a389383 (patch)
treee8fb644f7f90df9ceb32c9bdbba9367aaad833c2 /tests/node_compat/test/parallel/test-child-process-exit-code.js
parent52ababc4bf948904092cff54c2ab8b91f6b9b443 (diff)
fix(node): Run node compat tests listed in the `ignore` field (and fix the ones that fail) (#24631)
The intent is that those tests will be executed, but our check that the files are up to date won't overwrite the contents of the tests. This is useful when a test needs some manual edits to work. It turns out we weren't actually running them. --- This ended up turning into a couple of small bug fixes to get the tests passing: - We weren't canonicalizing the exec path properly (it sometimes still had `..` or `.` in it) - We weren't accepting strings in `process.exit` There was one failure I couldn't figure out quickly, so I disabled the test for now, and filed a follow up issue: #24694
Diffstat (limited to 'tests/node_compat/test/parallel/test-child-process-exit-code.js')
-rw-r--r--tests/node_compat/test/parallel/test-child-process-exit-code.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/node_compat/test/parallel/test-child-process-exit-code.js b/tests/node_compat/test/parallel/test-child-process-exit-code.js
index caa57986b..47309fb9c 100644
--- a/tests/node_compat/test/parallel/test-child-process-exit-code.js
+++ b/tests/node_compat/test/parallel/test-child-process-exit-code.js
@@ -27,7 +27,7 @@
// USE OR OTHER DEALINGS IN THE SOFTWARE.
// TODO(PolarETech): The args passed to spawn() should not need to
-// include "require.ts".
+// include "runner.ts".
'use strict';
const common = require('../common');
@@ -36,7 +36,7 @@ const spawn = require('child_process').spawn;
const fixtures = require('../common/fixtures');
const exitScript = fixtures.path('exit.js');
-const exitChild = spawn(process.argv[0], ['require.ts', exitScript, 23]);
+const exitChild = spawn(process.argv[0], ['runner.ts', exitScript, 23]);
exitChild.on('exit', common.mustCall(function(code, signal) {
assert.strictEqual(code, 23);
assert.strictEqual(signal, null);
@@ -44,7 +44,7 @@ exitChild.on('exit', common.mustCall(function(code, signal) {
const errorScript = fixtures.path('child_process_should_emit_error.js');
-const errorChild = spawn(process.argv[0], ['require.ts', errorScript]);
+const errorChild = spawn(process.argv[0], ['runner.ts', errorScript]);
errorChild.on('exit', common.mustCall(function(code, signal) {
assert.ok(code !== 0);
assert.strictEqual(signal, null);