test_runner: scope file-level hooks per file in no-isolation mode #5105
Annotations
5 errors
|
Build Node.js and run tests
Process completed with exit code 2.
|
|
Build Node.js and run tests:
test/test-runner/test-output-randomize-output-cli-none.mjs#L0
--- stderr ---
node:internal/modules/run_main:107
triggerUncaughtException(
^
AssertionError [ERR_ASSERTION]: Expected values to be strictly equal:
+ actual - expected
+ 'βΆ <project-root>/test/fixtures/test-runner/shards/j.cjs\n' +
+ ' β j.cjs this should pass (*ms)\n' +
+ 'β <project-root>/test/fixtures/test-runner/shards/j.cjs (*ms)\n' +
+ 'βΆ <project-root>/test/fixtures/test-runner/shards/c.cjs\n' +
+ ' β c.cjs this should pass (*ms)\n' +
+ 'β <project-root>/test/fixtures/test-runner/shards/c.cjs (*ms)\n' +
+ 'βΆ <project-root>/test/fixtures/test-runner/shards/e.cjs\n' +
+ ' β e.cjs this should pass (*ms)\n' +
+ 'β <project-root>/test/fixtures/test-runner/shards/e.cjs (*ms)\n' +
+ 'βΆ <project-root>/test/fixtures/test-runner/shards/h.cjs\n' +
+ ' β h.cjs this should pass (*ms)\n' +
+ 'β <project-root>/test/fixtures/test-runner/shards/h.cjs (*ms)\n' +
+ 'βΆ <project-root>/test/fixtures/test-runner/shards/f.cjs\n' +
+ ' β f.cjs this should pass (*ms)\n' +
+ 'β <project-root>/test/fixtures/test-runner/shards/f.cjs (*ms)\n' +
+ 'βΆ <project-root>/test/fixtures/test-runner/shards/b.cjs\n' +
+ ' β b.cjs this should pass (*ms)\n' +
+ 'β <project-root>/test/fixtures/test-runner/shards/b.cjs (*ms)\n' +
+ 'βΆ <project-root>/test/fixtures/test-runner/shards/a.cjs\n' +
+ ' β a.cjs this should pass (*ms)\n' +
+ 'β <project-root>/test/fixtures/test-runner/shards/a.cjs (*ms)\n' +
+ 'βΆ <project-root>/test/fixtures/test-runner/shards/i.cjs\n' +
+ ' β i.cjs this should pass (*ms)\n' +
+ 'β <project-root>/test/fixtures/test-runner/shards/i.cjs (*ms)\n' +
+ 'βΆ <project-root>/test/fixtures/test-runner/shards/g.cjs\n' +
+ ' β g.cjs this should pass (*ms)\n' +
+ 'β <project-root>/test/fixtures/test-runner/shards/g.cjs (*ms)\n' +
+ 'βΆ <project-root>/test/fixtures/test-runner/shards/d.cjs\n' +
+ ' β d.cjs this should pass (*ms)\n' +
+ 'β <project-root>/test/fixtures/test-runner/shards/d.cjs (*ms)\n' +
- 'β j.cjs this should pass (*ms)\n' +
- 'β c.cjs this should pass (*ms)\n' +
- 'β e.cjs this should pass (*ms)\n' +
- 'β h.cjs this should pass (*ms)\n' +
- 'β f.cjs this should pass (*ms)\n' +
- 'β b.cjs this should pass (*ms)\n' +
- 'β a.cjs this should pass (*ms)\n' +
- 'β i.cjs this should pass (*ms)\n' +
- 'β g.cjs this should pass (*ms)\n' +
- 'β d.cjs this should pass (*ms)\n' +
'βΉ Randomized test order seed: 12345\n' +
'βΉ tests 10\n' +
+ 'βΉ suites 10\n' +
- 'βΉ suites 0\n' +
'βΉ pass 10\n' +
'βΉ fail 0\n' +
'βΉ cancelled 0\n' +
'βΉ skipped 0\n' +
'βΉ todo 0\n' +
at assertSnapshot (/Users/runner/work/_temp/node-v26.0.0-nightly2026-04-06f426fd5fd6-slim/test/common/assertSnapshot.js:173:12)
at async spawnAndAssert (/Users/runner/work/_temp/node-v26.0.0-nightly2026-04-06f426fd5fd6-slim/test/common/assertSnapshot.js:208:3)
at async file:///Users/runner/work/_temp/node-v26.0.0-nightly2026-04-06f426fd5fd6-slim/test/test-runner/test-output-randomize-output-cli-none.mjs:8:1 {
generatedMessage: true,
code: 'ERR_ASSERTION',
actual: 'βΆ <project-root>/test/fixtures/test-runner/shards/j.cjs\n' +
' β j.cjs this should pass (*ms)\n' +
'β <project-root>/test/fixtures/test-runner/shards/j.cjs (*ms)\n' +
'βΆ <project-root>/test/fixtures/test-runner/shards/c.cjs\n' +
' β c.cjs this should pass (*ms)\n' +
'β <project-root>/test/fixtures/test-runner/shards/c.cjs (*ms)\n' +
'βΆ <project-root>/test/fixtures/test-runner/shards/e.cjs\n' +
' β e.cjs this should pass (*ms)\n' +
'β <project-root>/test/fixtures/test-runner/shards/e.cjs (*ms)\n' +
'βΆ <project-root>/test/fixtures/test-runner/shards/h.cjs\n' +
' β h.cjs this should pass (*ms)\n' +
'β <project-root>/test/fixtures/test-runner/shards/h.cjs (*ms)\n' +
'βΆ <project-root>/test/fixtures/test-runner/shards/f.cjs\n' +
' β f.cjs this should pass (*ms)\n' +
'β <project-root>/test/fixtures/test-run
|
|
Build Node.js and run tests:
test/test-runner/test-output-randomize-nested-scenarios-output-cli-none.mjs#L0
--- stderr ---
node:internal/modules/run_main:107
triggerUncaughtException(
^
AssertionError [ERR_ASSERTION]: Expected values to be strictly equal:
+ actual - expected
+ 'βΆ <project-root>/test/fixtures/test-runner/randomize/internal-order-nested-scenarios.cjs\n' +
+ ' βΆ nested-scenarios\n' +
+ ' βΆ scenario describe-it\n' +
+ ' βΆ describe-it block\n' +
+ ' βΆ describe-it 2\n' +
+ ' βΆ describe-it 2-2\n' +
+ ' β describe-it 2-2-2 (*ms)\n' +
+ ' β describe-it 2-2-1 (*ms)\n' +
+ ' β describe-it 2-2-3 (*ms)\n' +
+ ' β describe-it 2-2 (*ms)\n' +
+ ' βΆ describe-it 2-1\n' +
+ ' β describe-it 2-1-2 (*ms)\n' +
+ ' β describe-it 2-1-1 (*ms)\n' +
+ ' β describe-it 2-1-3 (*ms)\n' +
+ ' β describe-it 2-1 (*ms)\n' +
+ ' βΆ describe-it 2-3\n' +
+ ' β describe-it 2-3-2 (*ms)\n' +
+ ' β describe-it 2-3-1 (*ms)\n' +
+ ' β describe-it 2-3-3 (*ms)\n' +
+ ' β describe-it 2-3 (*ms)\n' +
+ ' β describe-it 2 (*ms)\n' +
+ ' βΆ describe-it 1\n' +
+ ' βΆ describe-it 1-2\n' +
+ ' β describe-it 1-2-2 (*ms)\n' +
+ ' β describe-it 1-2-1 (*ms)\n' +
+ ' β describe-it 1-2-3 (*ms)\n' +
+ ' β describe-it 1-2 (*ms)\n' +
+ ' βΆ describe-it 1-1\n' +
+ ' β describe-it 1-1-2 (*ms)\n' +
+ ' β describe-it 1-1-1 (*ms)\n' +
+ ' β describe-it 1-1-3 (*ms)\n' +
+ ' β describe-it 1-1 (*ms)\n' +
+ ' βΆ describe-it 1-3\n' +
+ ' β describe-it 1-3-2 (*ms)\n' +
+ ' β describe-it 1-3-1 (*ms)\n' +
+ ' β describe-it 1-3-3 (*ms)\n' +
+ ' β describe-it 1-3 (*ms)\n' +
+ ' β describe-it 1 (*ms)\n' +
+ ' βΆ describe-it 3\n' +
+ ' βΆ describe-it 3-2\n' +
+ ' β describe-it 3-2-2 (*ms)\n' +
+ ' β describe-it 3-2-1 (*ms)\n' +
+ ' β describe-it 3-2-3 (*ms)\n' +
+ ' β describe-it 3-2 (*ms)\n' +
+ ' βΆ describe-it 3-1\n' +
+ ' β describe-it 3-1-2 (*ms)\n' +
+ ' β describe-it 3-1-1 (*ms)\n' +
+ ' β describe-it 3-1-3 (*ms)\n' +
+ ' β describe-it 3-1 (*ms)\n' +
+ ' βΆ describe-it 3-3\n' +
+ ' β describe-it 3-3-2 (*ms)\n' +
+ ' β describe-it 3-3-1 (*ms)\n' +
+ ' β describe-it 3-3-3 (*ms)\n' +
+ ' β describe-it 3-3 (*ms)\n' +
+ ' β describe-it 3 (*ms)\n' +
+ ' β describe-it block (*ms)\n' +
+ ' β scenario describe-it (*ms)\n' +
+ ' βΆ scenario static-no-await\n' +
+ ' βΆ static-no-await block\n' +
+ ' βΆ static-no-await 2\n' +
+ ' βΆ static-no-await 2-2\n' +
+ ' β static-no-await 2-2-2 (*ms)\n' +
+ ' β static-no-await 2-2-1 (*ms)\n' +
+ ' β static-no-await 2-2-3 (*ms)\n' +
+ ' β static-no-await 2-2 (*ms)\n' +
+ ' βΆ static-no-await 2-1\n' +
+ ' β static-no-await 2-1-2 (*ms)\n' +
+ ' β static-no-await 2-1-1 (*ms)\n' +
+ ' β static-no-await 2-1-3 (*ms)\n' +
+ ' β static-no-await 2-1 (*ms)\n' +
+ ' βΆ static-no-await 2-3\n' +
+ ' β static-no-await 2-3-2 (*ms)\n' +
+ ' β static-no-await 2-3-1 (*ms)\n' +
+ ' β static-no-await 2-3-3 (*ms)\n' +
+ ' β static-no-await 2-3 (*ms)\n' +
+ ' β static-no-await 2 (*ms)\n' +
+ ' βΆ static-no-await 1\n' +
+ ' βΆ static-no-await 1-2\n' +
+ ' β static-no-await 1-2-2 (*ms)\n' +
+ ' β static-no-await 1-2-1 (*ms)\n' +
+ ' β static-no-await 1-2-3 (*ms)\n' +
+ ' β static-no-await 1-2 (*ms)\n' +
+ ' βΆ static-n
|
|
Build Node.js and run tests:
test/parallel/test-runner-global-setup-teardown.mjs#L514
--- stdout ---
Test failure: 'should execute globalSetup and globalTeardown correctly with imported module containing tests'
Location: test/parallel/test-runner-global-setup-teardown.mjs:483:7
AssertionError [ERR_ASSERTION]: The input did not match the regular expression /suites 0/. Input:
'Global setup executed\n' +
'β Imported module Ok (0.842311ms)\n' +
'β Imported module Fail (0.22154ms)\n' +
'βΆ /Users/runner/work/_temp/node-v26.0.0-nightly2026-04-06f426fd5fd6-slim/test/fixtures/test-runner/global-setup-teardown/test-file.js\n' +
' β verify setup was executed (0.684449ms)\n' +
' β another simple test (0.31999ms)\n' +
'β /Users/runner/work/_temp/node-v26.0.0-nightly2026-04-06f426fd5fd6-slim/test/fixtures/test-runner/global-setup-teardown/test-file.js (1.305519ms)\n' +
'Global teardown executed\n' +
'βΉ tests 4\n' +
'βΉ suites 1\n' +
'βΉ pass 3\n' +
'βΉ fail 1\n' +
'βΉ cancelled 0\n' +
'βΉ skipped 0\n' +
'βΉ todo 0\n' +
'βΉ duration_ms 23.580217\n' +
'\n' +
'β failing tests:\n' +
'\n' +
'test at test/fixtures/test-runner/global-setup-teardown/imported-module-with-test.mjs:4:1\n' +
'β Imported module Fail (0.22154ms)\n' +
' Error: fail\n' +
' at TestContext.<anonymous> (file:///Users/runner/work/_temp/node-v26.0.0-nightly2026-04-06f426fd5fd6-slim/test/fixtures/test-runner/global-setup-teardown/imported-module-with-test.mjs:4:44)\n' +
' at Test.runInAsyncScope (node:async_hooks:226:14)\n' +
' at Test.run (node:internal/test_runner/test:1272:25)\n' +
' at Test.processPendingSubtests (node:internal/test_runner/test:887:18)\n' +
' at Test.postRun (node:internal/test_runner/test:1401:19)\n' +
' at Test.run (node:internal/test_runner/test:1329:12)\n' +
' at async startSubtestAfterBootstrap (node:internal/test_runner/harness:385:3)\n'
at TestContext.<anonymous> (file:///Users/runner/work/_temp/node-v26.0.0-nightly2026-04-06f426fd5fd6-slim/test/parallel/test-runner-global-setup-teardown.mjs:514:16)
at process.processTicksAndRejections (node:internal/process/task_queues:104:5)
at async Test.run (node:internal/test_runner/test:1279:7)
at async Suite.processPendingSubtests (node:internal/test_runner/test:887:7) {
generatedMessage: true,
code: 'ERR_ASSERTION',
actual: 'Global setup executed\n' +
'β Imported module Ok (0.842311ms)\n' +
'β Imported module Fail (0.22154ms)\n' +
'βΆ /Users/runner/work/_temp/node-v26.0.0-nightly2026-04-06f426fd5fd6-slim/test/fixtures/test-runner/global-setup-teardown/test-file.js\n' +
' β verify setup was executed (0.684449ms)\n' +
' β another simple test (0.31999ms)\n' +
'β /Users/runner/work/_temp/node-v26.0.0-nightly2026-04-06f426fd5fd6-slim/test/fixtures/test-runner/global-setup-teardown/test-file.js (1.305519ms)\n' +
'Global teardown executed\n' +
'βΉ tests 4\n' +
'βΉ suites 1\n' +
'...',
expected: /suites 0/,
operator: 'match',
diff: 'simple'
}
Command: out/Release/node --test-reporter=./test/common/test-error-reporter.js --test-reporter-destination=stdout /Users/runner/work/_temp/node-v26.0.0-nightly2026-04-06f426fd5fd6-slim/test/parallel/test-runner-global-setup-teardown.mjs
|
|
Build Node.js and run tests:
test/parallel/test-runner-cli.js#L39
--- stderr ---
node:internal/assert/utils:146
throw error;
^
AssertionError [ERR_ASSERTION]: The input did not match the regular expression /not ok 2 - this should fail/. Input:
'TAP version 13\n' +
'# Subtest: index.test.js\n' +
' # Subtest: this should pass\n' +
' ok 1 - this should pass\n' +
' ---\n' +
' duration_ms: 0.872228\n' +
" type: 'test'\n" +
' ...\n' +
' 1..1\n' +
'ok 1 - index.test.js\n' +
' ---\n' +
' duration_ms: 2.2139\n' +
" type: 'suite'\n" +
' ...\n' +
'# Subtest: random.test.mjs\n' +
' # Subtest: this should fail\n' +
' not ok 1 - this should fail\n' +
' ---\n' +
' duration_ms: 0.516392\n' +
" type: 'test'\n" +
" location: '/Users/runner/work/_temp/node-v26.0.0-nightly2026-04-06f426fd5fd6-slim/test/fixtures/test-runner/default-behavior/random.test.mjs:3:1'\n" +
" failureType: 'testCodeFailure'\n" +
" error: 'this is a failing test'\n" +
" code: 'ERR_TEST_FAILURE'\n" +
' stack: |-\n' +
' TestContext.<anonymous> (file:///Users/runner/work/_temp/node-v26.0.0-nightly2026-04-06f426fd5fd6-slim/test/fixtures/test-runner/default-behavior/random.test.mjs:4:9)\n' +
' Test.runInAsyncScope (node:async_hooks:226:14)\n' +
' Test.run (node:internal/test_runner/test:1272:25)\n' +
' Test.start (node:internal/test_runner/test:1167:17)\n' +
' node:internal/test_runner/test:1688:71\n' +
' node:internal/per_context/primordials:466:82\n' +
' new Promise (<anonymous>)\n' +
' new SafePromise (node:internal/per_context/primordials:435:3)\n' +
' node:internal/per_context/primordials:466:9\n' +
' Array.map (<anonymous>)\n' +
' ...\n' +
' 1..1\n' +
'not ok 2 - random.test.mjs\n' +
' ---\n' +
' duration_ms: 0.714029\n' +
" type: 'suite'\n" +
" location: '/Users/runner/work/_temp/node-v26.0.0-nightly2026-04-06f426fd5fd6-slim/test/fixtures/test-runner/default-behavior/random.test.mjs:1:1'\n" +
" failureType: 'subtestsFailed'\n" +
" error: '1 subtest failed'\n" +
" code: 'ERR_TEST_FAILURE'\n" +
' ...\n' +
'# Subtest: subdir/subdir_test.js\n' +
'ok 3 - subdir/subdir_test.js\n' +
' ---\n' +
' duration_ms: 0.100962\n' +
" type: 'suite'\n" +
' ...\n' +
'# Subtest: test/random.cjs\n' +
' # Subtest: this should pass\n' +
' ok 1 - this should pass\n' +
' ---\n' +
' duration_ms: 1.087134\n' +
" type: 'test'\n" +
' ...\n' +
' 1..1\n' +
'ok 4 - test/random.cjs\n' +
' ---\n' +
' duration_ms: 1.232715\n' +
" type: 'suite'\n" +
' ...\n' +
'# Subtest: test/skip_by_name.cjs\n' +
' # Subtest: this should be skipped\n' +
' ok 1 - this should be skipped\n' +
' ---\n' +
' duration_ms: 0.779393\n' +
" type: 'test'\n" +
' ...\n' +
' # Subtest: this should be executed\n' +
' ok 2 - this should be executed\n' +
' ---\n' +
' duration_ms: 0.929018\n' +
" type: 'test'\n" +
' ...\n' +
' 1..2\n' +
'ok 5 - test/skip_by_name.cjs\n' +
' ---\n' +
' duration_ms: 2.327135\n' +
" type: 'suite'\n" +
' ...\n' +
'# Subtest: test/suite_and_test.cjs\n' +
' # Subtest: this is a suite\n' +
' ok 1 - this is a suite\n' +
' ---\n' +
' duration_ms: 0.045955\n' +
" type: 'suite'\n" +
' ...\n' +
' # Subtest: this is a test\n' +
' ok 2 - this is a test\n' +
' ---\n' +
' duration_ms: 0.069878\n' +
" type: 'test'\n" +
' ...\n' +
' 1..2\n' +
'ok 6 - test/suite_and_test.cjs\n' +
' ---\n' +
' duration_ms: 0.425582\n' +
" type: 'suite'\n" +
' ...\n' +
'1..6\n' +
'# tests 6\n' +
'# suites 7\n' +
'# pass 5\n' +
'# fail 1\n' +
'# cancelled 0\n' +
'# skipped 0\n' +
'# todo 0\n' +
'# duration_ms 214.526224\n'
at Object.<anonymous> (/Users/runner/work/_temp/node-v26.0.0-nightly2026-04-06f426fd5fd6-slim/test/parallel/test-runner-cli.js:39:12)
at M
|
Loading