From 29934d558c188fdc3406706da19921ca5a389383 Mon Sep 17 00:00:00 2001 From: Nathan Whitaker <17734409+nathanwhit@users.noreply.github.com> Date: Tue, 23 Jul 2024 20:12:08 -0700 Subject: 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 --- tests/node_compat/test/sequential/test-child-process-exit.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/node_compat/test/sequential') diff --git a/tests/node_compat/test/sequential/test-child-process-exit.js b/tests/node_compat/test/sequential/test-child-process-exit.js index c8930b059..01910d72f 100644 --- a/tests/node_compat/test/sequential/test-child-process-exit.js +++ b/tests/node_compat/test/sequential/test-child-process-exit.js @@ -27,7 +27,7 @@ // USE OR OTHER DEALINGS IN THE SOFTWARE. // TODO(PolarETech): The process.argv[3] to be assigned to gen should be argv[2], -// and the arguments array passed to spawn() should not need to include "require.ts". +// and the arguments array passed to spawn() should not need to include "runner.ts". 'use strict'; require('../common'); @@ -49,7 +49,7 @@ if (gen === maxGen) { return; } -const child = ch.spawn(process.execPath, ['require.ts', __filename, gen + 1], { +const child = ch.spawn(process.execPath, ['runner.ts', __filename, gen + 1], { stdio: [ 'ignore', 'pipe', 'ignore' ] }); assert.ok(!child.stdin); -- cgit v1.2.3