Skip to content

test_runner: add exports option to mock.module #4450

test_runner: add exports option to mock.module

test_runner: add exports option to mock.module #4450

Triggered via pull request March 20, 2026 12:29
Status Failure
Total duration 34m 58s
Artifacts 1

test-shared.yml

on: pull_request
Build slim tarball
2m 16s
Build slim tarball
Matrix: build
Fit to window
Zoom out
Zoom in

Annotations

4 errors and 4 warnings
aarch64-linux: with shared libraries
Process completed with exit code 2.
aarch64-linux: with shared libraries: test/test-runner/test-output-coverage-with-mock-cjs.mjs#L0
--- stderr --- node:internal/modules/run_main:107 triggerUncaughtException( ^ AssertionError [ERR_ASSERTION]: Expected values to be strictly equal: + actual - expected ... Skipped lines 'TAP version 13\n' + '# Subtest: subject calls dependency\n' + 'ok 1 - subject calls dependency\n' + ' ---\n' + ' duration_ms: *\n' + ... '# -------------------------------------------------------------------------------\n' + + '# end of coverage report\n' + + '(node:<pid>) DeprecationWarning: mock.module(): options.namedExports is deprecated. Use options.exports instead.\n' + + '(Use `<node-exe> --trace-deprecation ...` to show where the warning was created)\n' - '# end of coverage report\n' at assertSnapshot (/home/runner/work/_temp/node-v26.0.0-nightly2026-03-205daa3eacda-slim/test/common/assertSnapshot.js:173:12) at async spawnAndAssert (/home/runner/work/_temp/node-v26.0.0-nightly2026-03-205daa3eacda-slim/test/common/assertSnapshot.js:208:3) at async file:///home/runner/work/_temp/node-v26.0.0-nightly2026-03-205daa3eacda-slim/test/test-runner/test-output-coverage-with-mock-cjs.mjs:10:1 { generatedMessage: true, code: 'ERR_ASSERTION', actual: 'TAP version 13\n' + '# Subtest: subject calls dependency\n' + 'ok 1 - subject calls dependency\n' + ' ---\n' + ' duration_ms: *\n' + " type: 'test'\n" + ' ...\n' + '1..1\n' + '# tests 1\n' + '# suites 0\n' + '# pass 1\n' + '# fail 0\n' + '# cancelled 0\n' + '# skipped 0\n' + '# todo 0\n' + '# duration_ms *\n' + '# start of coverage report\n' + '# -------------------------------------------------------------------------------\n' + '# file | line % | branch % | funcs % | uncovered lines\n' + '# -------------------------------------------------------------------------------\n' + '# test | | | |\n' + '# fixtures | | | |\n' + '# test-runner | | | |\n' + '# coverage-with-mock | | | |\n' + '# subject.mjs | 100.00 | 100.00 | 100.00 |\n' + '# output | | | |\n' + '# coverage-with-mock-cjs.mjs | 100.00 | 100.00 | 100.00 |\n' + '# -------------------------------------------------------------------------------\n' + '# all files | 100.00 | 100.00 | 100.00 |\n' + '# -------------------------------------------------------------------------------\n' + '# end of coverage report\n' + '(node:<pid>) DeprecationWarning: mock.module(): options.namedExports is deprecated. Use options.exports instead.\n' + '(Use `<node-exe> --trace-deprecation ...` to show where the warning was created)\n', expected: 'TAP version 13\n' + '# Subtest: subject calls dependency\n' + 'ok 1 - subject calls dependency\n' + ' ---\n' + ' duration_ms: *\n' + " type: 'test'\n" + ' ...\n' + '1..1\n' + '# tests 1\n' + '# suites 0\n' + '# pass 1\n' + '# fail 0\n' + '# cancelled 0\n' + '# skipped 0\n' + '# todo 0\n' + '# duration_ms *\n' + '# start of coverage report\n' + '# -------------------------------------------------------------------------------\n' + '# file | line % | branch % | funcs % | uncovered lines\n' + '# -------------------------------------------------------------------------------\n' + '# test | | | |\n' + '# fixtures | | | |\n' + '# test-runner | | | |\n' + '# coverage-with-mock | | | |\n' + '# subject.mjs | 100.00 | 100.00 | 100.00 |\n' + '# output | | | |\n' + '# cov
x86_64-linux: with shared libraries
Process completed with exit code 2.
x86_64-linux: with shared libraries: test/test-runner/test-output-coverage-with-mock-cjs.mjs#L0
--- stderr --- node:internal/modules/run_main:107 triggerUncaughtException( ^ AssertionError [ERR_ASSERTION]: Expected values to be strictly equal: + actual - expected ... Skipped lines 'TAP version 13\n' + '# Subtest: subject calls dependency\n' + 'ok 1 - subject calls dependency\n' + ' ---\n' + ' duration_ms: *\n' + ... '# -------------------------------------------------------------------------------\n' + + '# end of coverage report\n' + + '(node:<pid>) DeprecationWarning: mock.module(): options.namedExports is deprecated. Use options.exports instead.\n' + + '(Use `<node-exe> --trace-deprecation ...` to show where the warning was created)\n' - '# end of coverage report\n' at assertSnapshot (/home/runner/work/_temp/node-v26.0.0-nightly2026-03-205daa3eacda-slim/test/common/assertSnapshot.js:173:12) at async spawnAndAssert (/home/runner/work/_temp/node-v26.0.0-nightly2026-03-205daa3eacda-slim/test/common/assertSnapshot.js:208:3) at async file:///home/runner/work/_temp/node-v26.0.0-nightly2026-03-205daa3eacda-slim/test/test-runner/test-output-coverage-with-mock-cjs.mjs:10:1 { generatedMessage: true, code: 'ERR_ASSERTION', actual: 'TAP version 13\n' + '# Subtest: subject calls dependency\n' + 'ok 1 - subject calls dependency\n' + ' ---\n' + ' duration_ms: *\n' + " type: 'test'\n" + ' ...\n' + '1..1\n' + '# tests 1\n' + '# suites 0\n' + '# pass 1\n' + '# fail 0\n' + '# cancelled 0\n' + '# skipped 0\n' + '# todo 0\n' + '# duration_ms *\n' + '# start of coverage report\n' + '# -------------------------------------------------------------------------------\n' + '# file | line % | branch % | funcs % | uncovered lines\n' + '# -------------------------------------------------------------------------------\n' + '# test | | | |\n' + '# fixtures | | | |\n' + '# test-runner | | | |\n' + '# coverage-with-mock | | | |\n' + '# subject.mjs | 100.00 | 100.00 | 100.00 |\n' + '# output | | | |\n' + '# coverage-with-mock-cjs.mjs | 100.00 | 100.00 | 100.00 |\n' + '# -------------------------------------------------------------------------------\n' + '# all files | 100.00 | 100.00 | 100.00 |\n' + '# -------------------------------------------------------------------------------\n' + '# end of coverage report\n' + '(node:<pid>) DeprecationWarning: mock.module(): options.namedExports is deprecated. Use options.exports instead.\n' + '(Use `<node-exe> --trace-deprecation ...` to show where the warning was created)\n', expected: 'TAP version 13\n' + '# Subtest: subject calls dependency\n' + 'ok 1 - subject calls dependency\n' + ' ---\n' + ' duration_ms: *\n' + " type: 'test'\n" + ' ...\n' + '1..1\n' + '# tests 1\n' + '# suites 0\n' + '# pass 1\n' + '# fail 0\n' + '# cancelled 0\n' + '# skipped 0\n' + '# todo 0\n' + '# duration_ms *\n' + '# start of coverage report\n' + '# -------------------------------------------------------------------------------\n' + '# file | line % | branch % | funcs % | uncovered lines\n' + '# -------------------------------------------------------------------------------\n' + '# test | | | |\n' + '# fixtures | | | |\n' + '# test-runner | | | |\n' + '# coverage-with-mock | | | |\n' + '# subject.mjs | 100.00 | 100.00 | 100.00 |\n' + '# output | | | |\n' + '# cov
aarch64-linux: with shared libraries
Node.js 20 actions are deprecated. The following actions are running on Node.js 20 and may not work as expected: cachix/cachix-action@3ba601ff5bbb07c7220846facfa2cd81eeee15a1. Actions will be forced to run with Node.js 24 by default starting June 2nd, 2026. Please check if updated versions of these actions are available that support Node.js 24. To opt into Node.js 24 now, set the FORCE_JAVASCRIPT_ACTIONS_TO_NODE24=true environment variable on the runner or in your workflow file. Once Node.js 24 becomes the default, you can temporarily opt out by setting ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/
aarch64-darwin: with shared libraries
Node.js 20 actions are deprecated. The following actions are running on Node.js 20 and may not work as expected: cachix/cachix-action@3ba601ff5bbb07c7220846facfa2cd81eeee15a1. Actions will be forced to run with Node.js 24 by default starting June 2nd, 2026. Please check if updated versions of these actions are available that support Node.js 24. To opt into Node.js 24 now, set the FORCE_JAVASCRIPT_ACTIONS_TO_NODE24=true environment variable on the runner or in your workflow file. Once Node.js 24 becomes the default, you can temporarily opt out by setting ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/
x86_64-linux: with shared libraries
Node.js 20 actions are deprecated. The following actions are running on Node.js 20 and may not work as expected: cachix/cachix-action@3ba601ff5bbb07c7220846facfa2cd81eeee15a1. Actions will be forced to run with Node.js 24 by default starting June 2nd, 2026. Please check if updated versions of these actions are available that support Node.js 24. To opt into Node.js 24 now, set the FORCE_JAVASCRIPT_ACTIONS_TO_NODE24=true environment variable on the runner or in your workflow file. Once Node.js 24 becomes the default, you can temporarily opt out by setting ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/
x86_64-darwin: with shared libraries
Node.js 20 actions are deprecated. The following actions are running on Node.js 20 and may not work as expected: cachix/cachix-action@3ba601ff5bbb07c7220846facfa2cd81eeee15a1. Actions will be forced to run with Node.js 24 by default starting June 2nd, 2026. Please check if updated versions of these actions are available that support Node.js 24. To opt into Node.js 24 now, set the FORCE_JAVASCRIPT_ACTIONS_TO_NODE24=true environment variable on the runner or in your workflow file. Once Node.js 24 becomes the default, you can temporarily opt out by setting ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/

Artifacts

Produced during runtime
Name Size Digest
tarballs
48.4 MB
sha256:4ec4cde82b873f19b9e5e6f8f7b51c11137661815528e6b277284ef784f06d4a