From aee022c442a3363c832fe4d76e892d4f223ee0e3 Mon Sep 17 00:00:00 2001 From: Joyee Cheung Date: Tue, 21 Oct 2025 01:05:42 +0200 Subject: [PATCH 1/3] test: put helper in test-runner-output into common --- test/common/assertSnapshot.js | 99 ++++++++++++++++++++++++ test/parallel/test-runner-output.mjs | 110 ++++----------------------- 2 files changed, 114 insertions(+), 95 deletions(-) diff --git a/test/common/assertSnapshot.js b/test/common/assertSnapshot.js index 16509f12ee89..0e350cd1dac6 100644 --- a/test/common/assertSnapshot.js +++ b/test/common/assertSnapshot.js @@ -4,6 +4,7 @@ const path = require('node:path'); const test = require('node:test'); const fs = require('node:fs/promises'); const assert = require('node:assert/strict'); +const { hostname } = require('node:os'); const stackFramesRegexp = /(?<=\n)(\s+)((.+?)\s+\()?(?:\(?(.+?):(\d+)(?::(\d+))?)\)?(\s+\{)?(\[\d+m)?(\n|$)/g; const windowNewlineRegexp = /\r/g; @@ -100,6 +101,97 @@ async function spawnAndAssert(filename, transform = (x) => x, { tty = false, ... await assertSnapshot(transform(`${stdout}${stderr}`), filename); } +function replaceTestDuration(str) { + return str + .replaceAll(/duration_ms: [0-9.]+/g, 'duration_ms: *') + .replaceAll(/duration_ms [0-9.]+/g, 'duration_ms *'); +} + +const root = path.resolve(__dirname, '..', '..'); +const color = '(\\[\\d+m)'; +const stackTraceBasePath = new RegExp(`${color}\\(${root.replaceAll(/[\\^$*+?.()|[\]{}]/g, '\\$&')}/?${color}(.*)${color}\\)`, 'g'); + +function replaceSpecDuration(str) { + return str + .replaceAll(/[0-9.]+ms/g, '*ms') + .replaceAll(/duration_ms [0-9.]+/g, 'duration_ms *') + .replace(stackTraceBasePath, '$3'); +} + +function replaceJunitDuration(str) { + return str + .replaceAll(/time="[0-9.]+"/g, 'time="*"') + .replaceAll(/duration_ms [0-9.]+/g, 'duration_ms *') + .replaceAll(`hostname="${hostname()}"`, 'hostname="HOSTNAME"') + .replaceAll(/file="[^"]*"/g, 'file="*"') + .replace(stackTraceBasePath, '$3'); +} + +function removeWindowsPathEscaping(str) { + return common.isWindows ? str.replaceAll(/\\\\/g, '\\') : str; +} + +function replaceTestLocationLine(str) { + return str.replaceAll(/(js:)(\d+)(:\d+)/g, '$1(LINE)$3'); +} + +// The Node test coverage returns results for all files called by the test. This +// will make the output file change if files like test/common/index.js change. +// This transform picks only the first line and then the lines from the test +// file. +function pickTestFileFromLcov(str) { + const lines = str.split(/\n/); + const firstLineOfTestFile = lines.findIndex( + (line) => line.startsWith('SF:') && line.trim().endsWith('output.js'), + ); + const lastLineOfTestFile = lines.findIndex( + (line, index) => index > firstLineOfTestFile && line.trim() === 'end_of_record', + ); + return ( + lines[0] + '\n' + lines.slice(firstLineOfTestFile, lastLineOfTestFile + 1).join('\n') + '\n' + ); +} + +const defaultTransform = transform( + replaceWindowsLineEndings, + replaceStackTrace, + removeWindowsPathEscaping, + transformProjectRoot(), + replaceWindowsPaths, + replaceTestDuration, + replaceTestLocationLine, +); +const specTransform = transform( + replaceSpecDuration, + replaceWindowsLineEndings, + replaceStackTrace, + replaceWindowsPaths, +); +const junitTransform = transform( + replaceJunitDuration, + replaceWindowsLineEndings, + replaceStackTrace, + replaceWindowsPaths, +); +const lcovTransform = transform( + replaceWindowsLineEndings, + replaceStackTrace, + transformProjectRoot(), + replaceWindowsPaths, + pickTestFileFromLcov, +); + +function ensureCwdIsProjectRoot() { + if (process.cwd() !== root) { + process.chdir(root); + } +} + +function canColorize() { + // Loading it lazily to avoid breaking `NODE_REGENERATE_SNAPSHOTS`. + return require('internal/tty').getColorDepth() > 2; +} + module.exports = { assertSnapshot, getSnapshotPath, @@ -111,4 +203,11 @@ module.exports = { spawnAndAssert, transform, transformProjectRoot, + replaceTestDuration, + defaultTransform, + specTransform, + junitTransform, + lcovTransform, + ensureCwdIsProjectRoot, + canColorize, }; diff --git a/test/parallel/test-runner-output.mjs b/test/parallel/test-runner-output.mjs index f854447c4526..e04a80194219 100644 --- a/test/parallel/test-runner-output.mjs +++ b/test/parallel/test-runner-output.mjs @@ -3,100 +3,23 @@ import * as common from '../common/index.mjs'; import * as fixtures from '../common/fixtures.mjs'; import * as snapshot from '../common/assertSnapshot.js'; import { describe, it } from 'node:test'; -import { hostname } from 'node:os'; -import { chdir, cwd } from 'node:process'; -import { fileURLToPath } from 'node:url'; + +const { + defaultTransform, + specTransform, + junitTransform, + lcovTransform, + replaceTestDuration, + ensureCwdIsProjectRoot, + canColorize, +} = snapshot; + +ensureCwdIsProjectRoot(); const skipForceColors = process.config.variables.icu_gyp_path !== 'tools/icu/icu-generic.gyp' || process.config.variables.node_shared_openssl; -// We're using dynamic import here to not break `NODE_REGENERATE_SNAPSHOTS`. -const canColorize = (await import('internal/tty')).default.getColorDepth() > 2; -const skipCoverageColors = !canColorize; - -function replaceTestDuration(str) { - return str - .replaceAll(/duration_ms: [0-9.]+/g, 'duration_ms: *') - .replaceAll(/duration_ms [0-9.]+/g, 'duration_ms *'); -} - -const root = fileURLToPath(new URL('../..', import.meta.url)).slice(0, -1); - -const color = '(\\[\\d+m)'; -const stackTraceBasePath = new RegExp(`${color}\\(${root.replaceAll(/[\\^$*+?.()|[\]{}]/g, '\\$&')}/?${color}(.*)${color}\\)`, 'g'); - -function replaceSpecDuration(str) { - return str - .replaceAll(/[0-9.]+ms/g, '*ms') - .replaceAll(/duration_ms [0-9.]+/g, 'duration_ms *') - .replace(stackTraceBasePath, '$3'); -} - -function replaceJunitDuration(str) { - return str - .replaceAll(/time="[0-9.]+"/g, 'time="*"') - .replaceAll(/duration_ms [0-9.]+/g, 'duration_ms *') - .replaceAll(`hostname="${hostname()}"`, 'hostname="HOSTNAME"') - .replaceAll(/file="[^"]*"/g, 'file="*"') - .replace(stackTraceBasePath, '$3'); -} - -function removeWindowsPathEscaping(str) { - return common.isWindows ? str.replaceAll(/\\\\/g, '\\') : str; -} - -function replaceTestLocationLine(str) { - return str.replaceAll(/(js:)(\d+)(:\d+)/g, '$1(LINE)$3'); -} - -// The Node test coverage returns results for all files called by the test. This -// will make the output file change if files like test/common/index.js change. -// This transform picks only the first line and then the lines from the test -// file. -function pickTestFileFromLcov(str) { - const lines = str.split(/\n/); - const firstLineOfTestFile = lines.findIndex( - (line) => line.startsWith('SF:') && line.trim().endsWith('output.js') - ); - const lastLineOfTestFile = lines.findIndex( - (line, index) => index > firstLineOfTestFile && line.trim() === 'end_of_record' - ); - return ( - lines[0] + '\n' + lines.slice(firstLineOfTestFile, lastLineOfTestFile + 1).join('\n') + '\n' - ); -} - -const defaultTransform = snapshot.transform( - snapshot.replaceWindowsLineEndings, - snapshot.replaceStackTrace, - removeWindowsPathEscaping, - snapshot.transformProjectRoot(), - snapshot.replaceWindowsPaths, - replaceTestDuration, - replaceTestLocationLine, -); -const specTransform = snapshot.transform( - replaceSpecDuration, - snapshot.replaceWindowsLineEndings, - snapshot.replaceStackTrace, - snapshot.replaceWindowsPaths, -); -const junitTransform = snapshot.transform( - replaceJunitDuration, - snapshot.replaceWindowsLineEndings, - snapshot.replaceStackTrace, - snapshot.replaceWindowsPaths, -); -const lcovTransform = snapshot.transform( - snapshot.replaceWindowsLineEndings, - snapshot.replaceStackTrace, - snapshot.transformProjectRoot(), - snapshot.replaceWindowsPaths, - pickTestFileFromLcov -); - - const tests = [ { name: 'test-runner/output/abort.js', flags: ['--test-reporter=tap'] }, { @@ -225,7 +148,7 @@ const tests = [ name: 'test-runner/output/non-tty-forced-color-output.js', transform: specTransform, }, - canColorize ? { + canColorize() ? { name: 'test-runner/output/assertion-color-tty.mjs', flags: ['--test', '--stack-trace-limit=0'], transform: specTransform, @@ -276,7 +199,7 @@ const tests = [ name: 'test-runner/output/coverage-width-80.mjs', flags: ['--test-reporter=tap', '--test-coverage-exclude=!test/**'], } : false, - process.features.inspector && !skipCoverageColors ? { + process.features.inspector && canColorize() ? { name: 'test-runner/output/coverage-width-80-color.mjs', flags: ['--test-coverage-exclude=!test/**'], transform: specTransform, @@ -302,7 +225,7 @@ const tests = [ name: 'test-runner/output/coverage-width-100-uncovered-lines.mjs', flags: ['--test-reporter=tap', '--test-coverage-exclude=!test/**'], } : false, - process.features.inspector && !skipCoverageColors ? { + process.features.inspector && canColorize() ? { name: 'test-runner/output/coverage-width-80-uncovered-lines-color.mjs', flags: ['--test-coverage-exclude=!test/**'], transform: specTransform, @@ -348,9 +271,6 @@ const tests = [ }), })); -if (cwd() !== root) { - chdir(root); -} describe('test runner output', { concurrency: true }, () => { for (const { name, fn } of tests) { it(name, fn); From 72e27824ddcde9136e613777b309ea3d1cec6d7e Mon Sep 17 00:00:00 2001 From: Joyee Cheung Date: Tue, 21 Oct 2025 01:34:01 +0200 Subject: [PATCH 2/3] test: split test-runner-output This test has been flaky for months. As it squeezes too many independent test cases together in one file, split this up before marking any persistent flaky cases as flaky, to avoid masking regressions in other non-flaky cases. --- test/parallel/test-runner-output.mjs | 278 ------------------ test/test-runner/test-output-abort-hooks.mjs | 12 + .../test-output-abort-runs-after-hook.mjs | 13 + test/test-runner/test-output-abort-suite.mjs | 12 + test/test-runner/test-output-abort.mjs | 12 + .../test-output-arbitrary-output-colored.mjs | 28 ++ .../test-output-arbitrary-output.mjs | 13 + .../test-output-assertion-color-tty.mjs | 17 ++ .../test-output-async-test-scheduling.mjs | 13 + ...fore-and-after-each-too-many-listeners.mjs | 13 + ...r-each-with-timeout-too-many-listeners.mjs | 13 + .../test-output-coverage-failure.mjs | 17 ++ .../test-output-coverage-short-filename.mjs | 20 ++ ...put-coverage-width-100-uncovered-lines.mjs | 17 ++ .../test-output-coverage-width-100.mjs | 17 ++ ...put-coverage-width-150-uncovered-lines.mjs | 17 ++ .../test-output-coverage-width-150.mjs | 17 ++ .../test-output-coverage-width-40.mjs | 17 ++ .../test-output-coverage-width-80-color.mjs | 21 ++ ...overage-width-80-uncovered-lines-color.mjs | 21 ++ ...tput-coverage-width-80-uncovered-lines.mjs | 17 ++ .../test-output-coverage-width-80.mjs | 17 ++ ...overage-width-infinity-uncovered-lines.mjs | 17 ++ .../test-output-coverage-width-infinity.mjs | 17 ++ .../test-output-coverage-with-mock.mjs | 26 ++ .../test-output-default-output.mjs | 12 + test/test-runner/test-output-describe-it.mjs | 12 + .../test-output-describe-nested.mjs | 12 + .../test-output-dot-output-custom-columns.mjs | 13 + test/test-runner/test-output-dot-reporter.mjs | 11 + test/test-runner/test-output-eval-dot.mjs | 11 + test/test-runner/test-output-eval-spec.mjs | 11 + test/test-runner/test-output-eval-tap.mjs | 11 + ...st-output-filtered-suite-delayed-build.mjs | 13 + .../test-output-filtered-suite-order.mjs | 13 + .../test-output-filtered-suite-throws.mjs | 13 + test/test-runner/test-output-force-exit.mjs | 11 + ...tput-global-after-should-fail-the-test.mjs | 13 + ...test-output-global-hooks-with-no-tests.mjs | 13 + .../test-output-hooks-spec-reporter.mjs | 12 + .../test-output-hooks-with-no-global-test.mjs | 13 + test/test-runner/test-output-hooks.mjs | 12 + .../test-output-junit-reporter.mjs | 12 + .../test-runner/test-output-lcov-reporter.mjs | 15 + .../test-output-name-and-skip-patterns.mjs | 13 + .../test-output-name-pattern-with-only.mjs | 13 + test/test-runner/test-output-name-pattern.mjs | 12 + test/test-runner/test-output-no-refs.mjs | 12 + test/test-runner/test-output-no-tests.mjs | 12 + ...est-output-non-tty-forced-color-output.mjs | 12 + test/test-runner/test-output-only-tests.mjs | 12 + test/test-runner/test-output-output-cli.mjs | 11 + test/test-runner/test-output-output.mjs | 12 + .../test-output-skip-each-hooks.mjs | 12 + test/test-runner/test-output-skip-pattern.mjs | 12 + .../test-output-source-mapped-locations.mjs | 13 + .../test-output-spec-reporter-cli.mjs | 12 + .../test-output-spec-reporter-successful.mjs | 12 + .../test-runner/test-output-spec-reporter.mjs | 11 + .../test-output-suite-skip-hooks.mjs | 12 + test/test-runner/test-output-tap-escape.mjs | 18 ++ ...gnostic-warning-without-test-only-flag.mjs | 13 + .../test-output-test-runner-plan-timeout.mjs | 13 + .../test-output-test-runner-plan.mjs | 13 + .../test-output-test-runner-watch-spec.mjs | 12 + ...est-output-test-timeout-flag-with-test.mjs | 14 + .../test-output-test-timeout-flag.mjs | 13 + .../test-output-timeout-in-before-each.mjs | 13 + .../test-output-typescript-coverage.mjs | 26 ++ ...st-output-unfinished-suite-async-error.mjs | 13 + test/test-runner/test-runner.status | 7 + test/test-runner/testcfg.py | 6 + 72 files changed, 991 insertions(+), 278 deletions(-) delete mode 100644 test/parallel/test-runner-output.mjs create mode 100644 test/test-runner/test-output-abort-hooks.mjs create mode 100644 test/test-runner/test-output-abort-runs-after-hook.mjs create mode 100644 test/test-runner/test-output-abort-suite.mjs create mode 100644 test/test-runner/test-output-abort.mjs create mode 100644 test/test-runner/test-output-arbitrary-output-colored.mjs create mode 100644 test/test-runner/test-output-arbitrary-output.mjs create mode 100644 test/test-runner/test-output-assertion-color-tty.mjs create mode 100644 test/test-runner/test-output-async-test-scheduling.mjs create mode 100644 test/test-runner/test-output-before-and-after-each-too-many-listeners.mjs create mode 100644 test/test-runner/test-output-before-and-after-each-with-timeout-too-many-listeners.mjs create mode 100644 test/test-runner/test-output-coverage-failure.mjs create mode 100644 test/test-runner/test-output-coverage-short-filename.mjs create mode 100644 test/test-runner/test-output-coverage-width-100-uncovered-lines.mjs create mode 100644 test/test-runner/test-output-coverage-width-100.mjs create mode 100644 test/test-runner/test-output-coverage-width-150-uncovered-lines.mjs create mode 100644 test/test-runner/test-output-coverage-width-150.mjs create mode 100644 test/test-runner/test-output-coverage-width-40.mjs create mode 100644 test/test-runner/test-output-coverage-width-80-color.mjs create mode 100644 test/test-runner/test-output-coverage-width-80-uncovered-lines-color.mjs create mode 100644 test/test-runner/test-output-coverage-width-80-uncovered-lines.mjs create mode 100644 test/test-runner/test-output-coverage-width-80.mjs create mode 100644 test/test-runner/test-output-coverage-width-infinity-uncovered-lines.mjs create mode 100644 test/test-runner/test-output-coverage-width-infinity.mjs create mode 100644 test/test-runner/test-output-coverage-with-mock.mjs create mode 100644 test/test-runner/test-output-default-output.mjs create mode 100644 test/test-runner/test-output-describe-it.mjs create mode 100644 test/test-runner/test-output-describe-nested.mjs create mode 100644 test/test-runner/test-output-dot-output-custom-columns.mjs create mode 100644 test/test-runner/test-output-dot-reporter.mjs create mode 100644 test/test-runner/test-output-eval-dot.mjs create mode 100644 test/test-runner/test-output-eval-spec.mjs create mode 100644 test/test-runner/test-output-eval-tap.mjs create mode 100644 test/test-runner/test-output-filtered-suite-delayed-build.mjs create mode 100644 test/test-runner/test-output-filtered-suite-order.mjs create mode 100644 test/test-runner/test-output-filtered-suite-throws.mjs create mode 100644 test/test-runner/test-output-force-exit.mjs create mode 100644 test/test-runner/test-output-global-after-should-fail-the-test.mjs create mode 100644 test/test-runner/test-output-global-hooks-with-no-tests.mjs create mode 100644 test/test-runner/test-output-hooks-spec-reporter.mjs create mode 100644 test/test-runner/test-output-hooks-with-no-global-test.mjs create mode 100644 test/test-runner/test-output-hooks.mjs create mode 100644 test/test-runner/test-output-junit-reporter.mjs create mode 100644 test/test-runner/test-output-lcov-reporter.mjs create mode 100644 test/test-runner/test-output-name-and-skip-patterns.mjs create mode 100644 test/test-runner/test-output-name-pattern-with-only.mjs create mode 100644 test/test-runner/test-output-name-pattern.mjs create mode 100644 test/test-runner/test-output-no-refs.mjs create mode 100644 test/test-runner/test-output-no-tests.mjs create mode 100644 test/test-runner/test-output-non-tty-forced-color-output.mjs create mode 100644 test/test-runner/test-output-only-tests.mjs create mode 100644 test/test-runner/test-output-output-cli.mjs create mode 100644 test/test-runner/test-output-output.mjs create mode 100644 test/test-runner/test-output-skip-each-hooks.mjs create mode 100644 test/test-runner/test-output-skip-pattern.mjs create mode 100644 test/test-runner/test-output-source-mapped-locations.mjs create mode 100644 test/test-runner/test-output-spec-reporter-cli.mjs create mode 100644 test/test-runner/test-output-spec-reporter-successful.mjs create mode 100644 test/test-runner/test-output-spec-reporter.mjs create mode 100644 test/test-runner/test-output-suite-skip-hooks.mjs create mode 100644 test/test-runner/test-output-tap-escape.mjs create mode 100644 test/test-runner/test-output-test-diagnostic-warning-without-test-only-flag.mjs create mode 100644 test/test-runner/test-output-test-runner-plan-timeout.mjs create mode 100644 test/test-runner/test-output-test-runner-plan.mjs create mode 100644 test/test-runner/test-output-test-runner-watch-spec.mjs create mode 100644 test/test-runner/test-output-test-timeout-flag-with-test.mjs create mode 100644 test/test-runner/test-output-test-timeout-flag.mjs create mode 100644 test/test-runner/test-output-timeout-in-before-each.mjs create mode 100644 test/test-runner/test-output-typescript-coverage.mjs create mode 100644 test/test-runner/test-output-unfinished-suite-async-error.mjs create mode 100644 test/test-runner/test-runner.status create mode 100644 test/test-runner/testcfg.py diff --git a/test/parallel/test-runner-output.mjs b/test/parallel/test-runner-output.mjs deleted file mode 100644 index e04a80194219..000000000000 --- a/test/parallel/test-runner-output.mjs +++ /dev/null @@ -1,278 +0,0 @@ -// Flags: --expose-internals -import * as common from '../common/index.mjs'; -import * as fixtures from '../common/fixtures.mjs'; -import * as snapshot from '../common/assertSnapshot.js'; -import { describe, it } from 'node:test'; - -const { - defaultTransform, - specTransform, - junitTransform, - lcovTransform, - replaceTestDuration, - ensureCwdIsProjectRoot, - canColorize, -} = snapshot; - -ensureCwdIsProjectRoot(); - -const skipForceColors = - process.config.variables.icu_gyp_path !== 'tools/icu/icu-generic.gyp' || - process.config.variables.node_shared_openssl; - -const tests = [ - { name: 'test-runner/output/abort.js', flags: ['--test-reporter=tap'] }, - { - name: 'test-runner/output/abort-runs-after-hook.js', - flags: ['--test-reporter=tap'], - }, - { name: 'test-runner/output/abort_suite.js', flags: ['--test-reporter=tap'] }, - { name: 'test-runner/output/abort_hooks.js', flags: ['--test-reporter=tap'] }, - { name: 'test-runner/output/describe_it.js', flags: ['--test-reporter=tap'] }, - { - name: 'test-runner/output/describe_nested.js', - flags: ['--test-reporter=tap'], - }, - { name: 'test-runner/output/eval_dot.js', transform: specTransform }, - { name: 'test-runner/output/eval_spec.js', transform: specTransform }, - { name: 'test-runner/output/eval_tap.js' }, - { - name: 'test-runner/output/filtered-suite-delayed-build.js', - flags: ['--test-reporter=tap'], - }, - { - name: 'test-runner/output/filtered-suite-order.mjs', - flags: ['--test-reporter=tap'], - }, - { - name: 'test-runner/output/filtered-suite-throws.js', - flags: ['--test-reporter=tap'], - }, - { name: 'test-runner/output/hooks.js', flags: ['--test-reporter=tap'] }, - { name: 'test-runner/output/hooks_spec_reporter.js', transform: specTransform }, - { name: 'test-runner/output/skip-each-hooks.js', transform: specTransform }, - { name: 'test-runner/output/suite-skip-hooks.js', transform: specTransform }, - { - name: 'test-runner/output/timeout_in_before_each_should_not_affect_further_tests.js', - flags: ['--test-reporter=tap'], - }, - { - name: 'test-runner/output/test-timeout-flag.js', - flags: [ - '--test-reporter=tap', - '--test-timeout=100', - ], - }, - // --test-timeout should work with or without --test flag - { - name: 'test-runner/output/test-timeout-flag.js', - flags: [ - '--test-reporter=tap', - '--test-timeout=100', - '--test', - ], - }, - { - name: 'test-runner/output/hooks-with-no-global-test.js', - flags: ['--test-reporter=tap'], - }, - { - name: 'test-runner/output/global-hooks-with-no-tests.js', - flags: ['--test-reporter=tap'], - }, - { - name: 'test-runner/output/before-and-after-each-too-many-listeners.js', - flags: ['--test-reporter=tap'], - }, - { - name: 'test-runner/output/before-and-after-each-with-timeout-too-many-listeners.js', - flags: ['--test-reporter=tap'], - }, - { name: 'test-runner/output/force_exit.js', transform: specTransform }, - { - name: 'test-runner/output/global_after_should_fail_the_test.js', - flags: ['--test-reporter=tap'], - }, - { - name: 'test-runner/output/no_refs.js', - flags: ['--test-reporter=tap'], - }, - { - name: 'test-runner/output/no_tests.js', - flags: ['--test-reporter=tap'], - }, - { name: 'test-runner/output/only_tests.js', flags: ['--test-reporter=tap'] }, - { name: 'test-runner/output/dot_reporter.js', transform: specTransform }, - { name: 'test-runner/output/junit_reporter.js', transform: junitTransform }, - { name: 'test-runner/output/spec_reporter_successful.js', transform: specTransform }, - { name: 'test-runner/output/spec_reporter.js', transform: specTransform }, - { name: 'test-runner/output/spec_reporter_cli.js', transform: specTransform }, - { - name: 'test-runner/output/source_mapped_locations.mjs', - flags: ['--test-reporter=tap'], - }, - process.features.inspector ? - { - name: 'test-runner/output/lcov_reporter.js', - transform: lcovTransform - } : - false, - { name: 'test-runner/output/output.js', flags: ['--test-reporter=tap'] }, - { name: 'test-runner/output/output_cli.js' }, - { - name: 'test-runner/output/name_and_skip_patterns.js', - flags: ['--test-reporter=tap'], - }, - { - name: 'test-runner/output/name_pattern.js', - flags: ['--test-reporter=tap'], - }, - { - name: 'test-runner/output/name_pattern_with_only.js', - flags: ['--test-reporter=tap'], - }, - { - name: 'test-runner/output/skip_pattern.js', - flags: ['--test-reporter=tap'], - }, - { - name: 'test-runner/output/unfinished-suite-async-error.js', - flags: ['--test-reporter=tap'], - }, - { name: 'test-runner/output/default_output.js', transform: specTransform, tty: true }, - { - name: 'test-runner/output/arbitrary-output.js', - flags: ['--test-reporter=tap'], - }, - { - name: 'test-runner/output/non-tty-forced-color-output.js', - transform: specTransform, - }, - canColorize() ? { - name: 'test-runner/output/assertion-color-tty.mjs', - flags: ['--test', '--stack-trace-limit=0'], - transform: specTransform, - tty: true, - } : false, - { - name: 'test-runner/output/async-test-scheduling.mjs', - flags: ['--test-reporter=tap'], - }, - !skipForceColors ? { - name: 'test-runner/output/arbitrary-output-colored.js', - transform: snapshot.transform(specTransform, replaceTestDuration), tty: true - } : false, - { name: 'test-runner/output/dot_output_custom_columns.js', transform: specTransform, tty: true }, - { - name: 'test-runner/output/tap_escape.js', - transform: snapshot.transform( - snapshot.replaceWindowsLineEndings, - replaceTestDuration, - ), - flags: ['--test-reporter=tap'], - }, - { - name: 'test-runner/output/test-runner-plan.js', - flags: ['--test-reporter=tap'], - }, - { - name: 'test-runner/output/test-runner-watch-spec.mjs', - transform: specTransform, - }, - { - name: 'test-runner/output/test-runner-plan-timeout.js', - flags: ['--test-reporter=tap', '--test-force-exit'], - }, - process.features.inspector ? { - name: 'test-runner/output/coverage_failure.js', - flags: ['--test-reporter=tap', '--test-coverage-exclude=!test/**'], - } : false, - { - name: 'test-runner/output/test-diagnostic-warning-without-test-only-flag.js', - flags: ['--test', '--test-reporter=tap'], - }, - process.features.inspector ? { - name: 'test-runner/output/coverage-width-40.mjs', - flags: ['--test-reporter=tap', '--test-coverage-exclude=!test/**'], - } : false, - process.features.inspector ? { - name: 'test-runner/output/coverage-width-80.mjs', - flags: ['--test-reporter=tap', '--test-coverage-exclude=!test/**'], - } : false, - process.features.inspector && canColorize() ? { - name: 'test-runner/output/coverage-width-80-color.mjs', - flags: ['--test-coverage-exclude=!test/**'], - transform: specTransform, - tty: true - } : false, - process.features.inspector ? { - name: 'test-runner/output/coverage-width-100.mjs', - flags: ['--test-reporter=tap', '--test-coverage-exclude=!test/**'], - } : false, - process.features.inspector ? { - name: 'test-runner/output/coverage-width-150.mjs', - flags: ['--test-reporter=tap', '--test-coverage-exclude=!test/**'], - } : false, - process.features.inspector ? { - name: 'test-runner/output/coverage-width-infinity.mjs', - flags: ['--test-reporter=tap', '--test-coverage-exclude=!test/**'], - } : false, - process.features.inspector ? { - name: 'test-runner/output/coverage-width-80-uncovered-lines.mjs', - flags: ['--test-reporter=tap', '--test-coverage-exclude=!test/**'], - } : false, - process.features.inspector ? { - name: 'test-runner/output/coverage-width-100-uncovered-lines.mjs', - flags: ['--test-reporter=tap', '--test-coverage-exclude=!test/**'], - } : false, - process.features.inspector && canColorize() ? { - name: 'test-runner/output/coverage-width-80-uncovered-lines-color.mjs', - flags: ['--test-coverage-exclude=!test/**'], - transform: specTransform, - tty: true - } : false, - process.features.inspector ? { - name: 'test-runner/output/coverage-width-150-uncovered-lines.mjs', - flags: ['--test-reporter=tap', '--test-coverage-exclude=!test/**'], - } : false, - process.features.inspector ? { - name: 'test-runner/output/coverage-width-infinity-uncovered-lines.mjs', - flags: ['--test-reporter=tap', '--test-coverage-exclude=!test/**'], - } : false, - process.features.inspector ? { - name: 'test-runner/output/coverage-short-filename.mjs', - flags: ['--test-reporter=tap', '--test-coverage-exclude=../output/**'], - cwd: fixtures.path('test-runner/coverage-snap'), - } : false, - process.features.inspector ? { - name: 'test-runner/output/typescript-coverage.mts', - flags: ['--disable-warning=ExperimentalWarning', - '--test-reporter=tap', - '--experimental-transform-types', - '--experimental-test-module-mocks', - '--experimental-test-coverage', - '--test-coverage-exclude=!test/**'] - } : false, - process.features.inspector ? { - name: 'test-runner/output/coverage-with-mock.mjs', - flags: ['--disable-warning=ExperimentalWarning', - '--test-reporter=tap', - '--experimental-transform-types', - '--experimental-test-module-mocks', - '--experimental-test-coverage', - '--test-coverage-exclude=!test/**'] - } : false, -] -.filter(Boolean) -.map(({ flags, name, tty, transform, cwd }) => ({ - name, - fn: common.mustCall(async () => { - await snapshot.spawnAndAssert(fixtures.path(name), transform ?? defaultTransform, { tty, flags, cwd }); - }), -})); - -describe('test runner output', { concurrency: true }, () => { - for (const { name, fn } of tests) { - it(name, fn); - } -}); diff --git a/test/test-runner/test-output-abort-hooks.mjs b/test/test-runner/test-output-abort-hooks.mjs new file mode 100644 index 000000000000..505658d947c9 --- /dev/null +++ b/test/test-runner/test-output-abort-hooks.mjs @@ -0,0 +1,12 @@ +// Flags: --expose-internals +// Test that the output of test-runner/output/abort_hooks.js matches test-runner/output/abort_hooks.snapshot +import '../common/index.mjs'; +import * as fixtures from '../common/fixtures.mjs'; +import { spawnAndAssert, defaultTransform, ensureCwdIsProjectRoot } from '../common/assertSnapshot.js'; + +ensureCwdIsProjectRoot(); +await spawnAndAssert( + fixtures.path('test-runner/output/abort_hooks.js'), + defaultTransform, + { flags: ['--test-reporter=tap'] }, +); diff --git a/test/test-runner/test-output-abort-runs-after-hook.mjs b/test/test-runner/test-output-abort-runs-after-hook.mjs new file mode 100644 index 000000000000..e602200dcf31 --- /dev/null +++ b/test/test-runner/test-output-abort-runs-after-hook.mjs @@ -0,0 +1,13 @@ +// Flags: --expose-internals +// Test that the output of test-runner/output/abort-runs-after-hook.js matches +// test-runner/output/abort-runs-after-hook.snapshot +import '../common/index.mjs'; +import * as fixtures from '../common/fixtures.mjs'; +import { spawnAndAssert, defaultTransform, ensureCwdIsProjectRoot } from '../common/assertSnapshot.js'; + +ensureCwdIsProjectRoot(); +await spawnAndAssert( + fixtures.path('test-runner/output/abort-runs-after-hook.js'), + defaultTransform, + { flags: ['--test-reporter=tap'] }, +); diff --git a/test/test-runner/test-output-abort-suite.mjs b/test/test-runner/test-output-abort-suite.mjs new file mode 100644 index 000000000000..51ebc7d217d2 --- /dev/null +++ b/test/test-runner/test-output-abort-suite.mjs @@ -0,0 +1,12 @@ +// Flags: --expose-internals +// Test that the output of test-runner/output/abort_suite.js matches test-runner/output/abort_suite.snapshot +import '../common/index.mjs'; +import * as fixtures from '../common/fixtures.mjs'; +import { spawnAndAssert, defaultTransform, ensureCwdIsProjectRoot } from '../common/assertSnapshot.js'; + +ensureCwdIsProjectRoot(); +await spawnAndAssert( + fixtures.path('test-runner/output/abort_suite.js'), + defaultTransform, + { flags: ['--test-reporter=tap'] }, +); diff --git a/test/test-runner/test-output-abort.mjs b/test/test-runner/test-output-abort.mjs new file mode 100644 index 000000000000..97010ed9457b --- /dev/null +++ b/test/test-runner/test-output-abort.mjs @@ -0,0 +1,12 @@ +// Flags: --expose-internals +// Test that the output of test-runner/output/abort.js matches test-runner/output/abort.snapshot +import '../common/index.mjs'; +import * as fixtures from '../common/fixtures.mjs'; +import { spawnAndAssert, defaultTransform, ensureCwdIsProjectRoot } from '../common/assertSnapshot.js'; + +ensureCwdIsProjectRoot(); +await spawnAndAssert( + fixtures.path('test-runner/output/abort.js'), + defaultTransform, + { flags: ['--test-reporter=tap'] }, +); diff --git a/test/test-runner/test-output-arbitrary-output-colored.mjs b/test/test-runner/test-output-arbitrary-output-colored.mjs new file mode 100644 index 000000000000..7d18ac507ccb --- /dev/null +++ b/test/test-runner/test-output-arbitrary-output-colored.mjs @@ -0,0 +1,28 @@ +// Flags: --expose-internals +// Test that the output of test-runner/output/arbitrary-output-colored.js matches +// test-runner/output/arbitrary-output-colored.snapshot +import * as common from '../common/index.mjs'; +import * as fixtures from '../common/fixtures.mjs'; +import { + spawnAndAssert, + specTransform, + replaceTestDuration, + transform, + ensureCwdIsProjectRoot, +} from '../common/assertSnapshot.js'; + +const skipForceColors = + process.config.variables.icu_gyp_path !== 'tools/icu/icu-generic.gyp' || + process.config.variables.node_shared_openssl; + +if (skipForceColors) { + // https://github.com/nodejs/node/pull/48057 + common.skip('Forced colors not supported in this build'); +} + +ensureCwdIsProjectRoot(); +await spawnAndAssert( + fixtures.path('test-runner/output/arbitrary-output-colored.js'), + transform(specTransform, replaceTestDuration), + { tty: true }, +); diff --git a/test/test-runner/test-output-arbitrary-output.mjs b/test/test-runner/test-output-arbitrary-output.mjs new file mode 100644 index 000000000000..a5ceda5eade9 --- /dev/null +++ b/test/test-runner/test-output-arbitrary-output.mjs @@ -0,0 +1,13 @@ +// Flags: --expose-internals +// Test that the output of test-runner/output/arbitrary-output.js matches +// test-runner/output/arbitrary-output.snapshot +import '../common/index.mjs'; +import * as fixtures from '../common/fixtures.mjs'; +import { spawnAndAssert, defaultTransform, ensureCwdIsProjectRoot } from '../common/assertSnapshot.js'; + +ensureCwdIsProjectRoot(); +await spawnAndAssert( + fixtures.path('test-runner/output/arbitrary-output.js'), + defaultTransform, + { flags: ['--test-reporter=tap'] }, +); diff --git a/test/test-runner/test-output-assertion-color-tty.mjs b/test/test-runner/test-output-assertion-color-tty.mjs new file mode 100644 index 000000000000..102b397c8157 --- /dev/null +++ b/test/test-runner/test-output-assertion-color-tty.mjs @@ -0,0 +1,17 @@ +// Flags: --expose-internals +// Test that the output of test-runner/output/assertion-color-tty.mjs matches +// test-runner/output/assertion-color-tty.snapshot +import * as common from '../common/index.mjs'; +import * as fixtures from '../common/fixtures.mjs'; +import { spawnAndAssert, specTransform, canColorize, ensureCwdIsProjectRoot } from '../common/assertSnapshot.js'; + +if (!canColorize()) { + common.skip('TTY colors not supported'); +} + +ensureCwdIsProjectRoot(); +await spawnAndAssert( + fixtures.path('test-runner/output/assertion-color-tty.mjs'), + specTransform, + { flags: ['--test', '--stack-trace-limit=0'], tty: true }, +); diff --git a/test/test-runner/test-output-async-test-scheduling.mjs b/test/test-runner/test-output-async-test-scheduling.mjs new file mode 100644 index 000000000000..999953b865df --- /dev/null +++ b/test/test-runner/test-output-async-test-scheduling.mjs @@ -0,0 +1,13 @@ +// Flags: --expose-internals +// Test that the output of test-runner/output/async-test-scheduling.mjs matches +// test-runner/output/async-test-scheduling.snapshot +import '../common/index.mjs'; +import * as fixtures from '../common/fixtures.mjs'; +import { spawnAndAssert, defaultTransform, ensureCwdIsProjectRoot } from '../common/assertSnapshot.js'; + +ensureCwdIsProjectRoot(); +await spawnAndAssert( + fixtures.path('test-runner/output/async-test-scheduling.mjs'), + defaultTransform, + { flags: ['--test-reporter=tap'] }, +); diff --git a/test/test-runner/test-output-before-and-after-each-too-many-listeners.mjs b/test/test-runner/test-output-before-and-after-each-too-many-listeners.mjs new file mode 100644 index 000000000000..3270d3aff2ec --- /dev/null +++ b/test/test-runner/test-output-before-and-after-each-too-many-listeners.mjs @@ -0,0 +1,13 @@ +// Flags: --expose-internals +// Test that the output of test-runner/output/before-and-after-each-too-many-listeners.js matches +// test-runner/output/before-and-after-each-too-many-listeners.snapshot +import '../common/index.mjs'; +import * as fixtures from '../common/fixtures.mjs'; +import { spawnAndAssert, defaultTransform, ensureCwdIsProjectRoot } from '../common/assertSnapshot.js'; + +ensureCwdIsProjectRoot(); +await spawnAndAssert( + fixtures.path('test-runner/output/before-and-after-each-too-many-listeners.js'), + defaultTransform, + { flags: ['--test-reporter=tap'] }, +); diff --git a/test/test-runner/test-output-before-and-after-each-with-timeout-too-many-listeners.mjs b/test/test-runner/test-output-before-and-after-each-with-timeout-too-many-listeners.mjs new file mode 100644 index 000000000000..ed6615c45746 --- /dev/null +++ b/test/test-runner/test-output-before-and-after-each-with-timeout-too-many-listeners.mjs @@ -0,0 +1,13 @@ +// Flags: --expose-internals +// Test that the output of test-runner/output/before-and-after-each-with-timeout-too-many-listeners.js matches +// test-runner/output/before-and-after-each-with-timeout-too-many-listeners.snapshot +import '../common/index.mjs'; +import * as fixtures from '../common/fixtures.mjs'; +import { spawnAndAssert, defaultTransform, ensureCwdIsProjectRoot } from '../common/assertSnapshot.js'; + +ensureCwdIsProjectRoot(); +await spawnAndAssert( + fixtures.path('test-runner/output/before-and-after-each-with-timeout-too-many-listeners.js'), + defaultTransform, + { flags: ['--test-reporter=tap'] }, +); diff --git a/test/test-runner/test-output-coverage-failure.mjs b/test/test-runner/test-output-coverage-failure.mjs new file mode 100644 index 000000000000..589b3134bc42 --- /dev/null +++ b/test/test-runner/test-output-coverage-failure.mjs @@ -0,0 +1,17 @@ +// Flags: --expose-internals +// Test that the output of test-runner/output/coverage_failure.js matches +// test-runner/output/coverage_failure.snapshot +import * as common from '../common/index.mjs'; +import * as fixtures from '../common/fixtures.mjs'; +import { spawnAndAssert, defaultTransform, ensureCwdIsProjectRoot } from '../common/assertSnapshot.js'; + +if (!process.features.inspector) { + common.skip('inspector support required'); +} + +ensureCwdIsProjectRoot(); +await spawnAndAssert( + fixtures.path('test-runner/output/coverage_failure.js'), + defaultTransform, + { flags: ['--test-reporter=tap', '--test-coverage-exclude=!test/**'] }, +); diff --git a/test/test-runner/test-output-coverage-short-filename.mjs b/test/test-runner/test-output-coverage-short-filename.mjs new file mode 100644 index 000000000000..1ee1c2323337 --- /dev/null +++ b/test/test-runner/test-output-coverage-short-filename.mjs @@ -0,0 +1,20 @@ +// Flags: --expose-internals +// Test that the output of test-runner/output/coverage-short-filename.mjs matches +// test-runner/output/coverage-short-filename.snapshot +import * as common from '../common/index.mjs'; +import * as fixtures from '../common/fixtures.mjs'; +import { spawnAndAssert, defaultTransform, ensureCwdIsProjectRoot } from '../common/assertSnapshot.js'; + +if (!process.features.inspector) { + common.skip('inspector support required'); +} + +ensureCwdIsProjectRoot(); +await spawnAndAssert( + fixtures.path('test-runner/output/coverage-short-filename.mjs'), + defaultTransform, + { + flags: ['--test-reporter=tap', '--test-coverage-exclude=../output/**'], + cwd: fixtures.path('test-runner/coverage-snap'), + }, +); diff --git a/test/test-runner/test-output-coverage-width-100-uncovered-lines.mjs b/test/test-runner/test-output-coverage-width-100-uncovered-lines.mjs new file mode 100644 index 000000000000..6d56534a8fb1 --- /dev/null +++ b/test/test-runner/test-output-coverage-width-100-uncovered-lines.mjs @@ -0,0 +1,17 @@ +// Flags: --expose-internals +// Test that the output of test-runner/output/coverage-width-100-uncovered-lines.mjs matches +// test-runner/output/coverage-width-100-uncovered-lines.snapshot +import * as common from '../common/index.mjs'; +import * as fixtures from '../common/fixtures.mjs'; +import { spawnAndAssert, defaultTransform, ensureCwdIsProjectRoot } from '../common/assertSnapshot.js'; + +if (!process.features.inspector) { + common.skip('inspector support required'); +} + +ensureCwdIsProjectRoot(); +await spawnAndAssert( + fixtures.path('test-runner/output/coverage-width-100-uncovered-lines.mjs'), + defaultTransform, + { flags: ['--test-reporter=tap', '--test-coverage-exclude=!test/**'] }, +); diff --git a/test/test-runner/test-output-coverage-width-100.mjs b/test/test-runner/test-output-coverage-width-100.mjs new file mode 100644 index 000000000000..79eb7c2b67b8 --- /dev/null +++ b/test/test-runner/test-output-coverage-width-100.mjs @@ -0,0 +1,17 @@ +// Flags: --expose-internals +// Test that the output of test-runner/output/coverage-width-100.mjs matches +// test-runner/output/coverage-width-100.snapshot +import * as common from '../common/index.mjs'; +import * as fixtures from '../common/fixtures.mjs'; +import { spawnAndAssert, defaultTransform, ensureCwdIsProjectRoot } from '../common/assertSnapshot.js'; + +if (!process.features.inspector) { + common.skip('inspector support required'); +} + +ensureCwdIsProjectRoot(); +await spawnAndAssert( + fixtures.path('test-runner/output/coverage-width-100.mjs'), + defaultTransform, + { flags: ['--test-reporter=tap', '--test-coverage-exclude=!test/**'] }, +); diff --git a/test/test-runner/test-output-coverage-width-150-uncovered-lines.mjs b/test/test-runner/test-output-coverage-width-150-uncovered-lines.mjs new file mode 100644 index 000000000000..e5eeee7d4407 --- /dev/null +++ b/test/test-runner/test-output-coverage-width-150-uncovered-lines.mjs @@ -0,0 +1,17 @@ +// Flags: --expose-internals +// Test that the output of test-runner/output/coverage-width-150-uncovered-lines.mjs matches +// test-runner/output/coverage-width-150-uncovered-lines.snapshot +import * as common from '../common/index.mjs'; +import * as fixtures from '../common/fixtures.mjs'; +import { spawnAndAssert, defaultTransform, ensureCwdIsProjectRoot } from '../common/assertSnapshot.js'; + +if (!process.features.inspector) { + common.skip('inspector support required'); +} + +ensureCwdIsProjectRoot(); +await spawnAndAssert( + fixtures.path('test-runner/output/coverage-width-150-uncovered-lines.mjs'), + defaultTransform, + { flags: ['--test-reporter=tap', '--test-coverage-exclude=!test/**'] }, +); diff --git a/test/test-runner/test-output-coverage-width-150.mjs b/test/test-runner/test-output-coverage-width-150.mjs new file mode 100644 index 000000000000..c0455ad3d66f --- /dev/null +++ b/test/test-runner/test-output-coverage-width-150.mjs @@ -0,0 +1,17 @@ +// Flags: --expose-internals +// Test that the output of test-runner/output/coverage-width-150.mjs matches +// test-runner/output/coverage-width-150.snapshot +import * as common from '../common/index.mjs'; +import * as fixtures from '../common/fixtures.mjs'; +import { spawnAndAssert, defaultTransform, ensureCwdIsProjectRoot } from '../common/assertSnapshot.js'; + +if (!process.features.inspector) { + common.skip('inspector support required'); +} + +ensureCwdIsProjectRoot(); +await spawnAndAssert( + fixtures.path('test-runner/output/coverage-width-150.mjs'), + defaultTransform, + { flags: ['--test-reporter=tap', '--test-coverage-exclude=!test/**'] }, +); diff --git a/test/test-runner/test-output-coverage-width-40.mjs b/test/test-runner/test-output-coverage-width-40.mjs new file mode 100644 index 000000000000..179fae4f775f --- /dev/null +++ b/test/test-runner/test-output-coverage-width-40.mjs @@ -0,0 +1,17 @@ +// Flags: --expose-internals +// Test that the output of test-runner/output/coverage-width-40.mjs matches +// test-runner/output/coverage-width-40.snapshot +import * as common from '../common/index.mjs'; +import * as fixtures from '../common/fixtures.mjs'; +import { spawnAndAssert, defaultTransform, ensureCwdIsProjectRoot } from '../common/assertSnapshot.js'; + +if (!process.features.inspector) { + common.skip('inspector support required'); +} + +ensureCwdIsProjectRoot(); +await spawnAndAssert( + fixtures.path('test-runner/output/coverage-width-40.mjs'), + defaultTransform, + { flags: ['--test-reporter=tap', '--test-coverage-exclude=!test/**'] }, +); diff --git a/test/test-runner/test-output-coverage-width-80-color.mjs b/test/test-runner/test-output-coverage-width-80-color.mjs new file mode 100644 index 000000000000..97d11c2a48a5 --- /dev/null +++ b/test/test-runner/test-output-coverage-width-80-color.mjs @@ -0,0 +1,21 @@ +// Flags: --expose-internals +// Test that the output of test-runner/output/coverage-width-80-color.mjs matches +// test-runner/output/coverage-width-80-color.snapshot +import * as common from '../common/index.mjs'; +import * as fixtures from '../common/fixtures.mjs'; +import { spawnAndAssert, specTransform, canColorize, ensureCwdIsProjectRoot } from '../common/assertSnapshot.js'; + +if (!process.features.inspector) { + common.skip('inspector support required'); +} + +if (!canColorize()) { + common.skip('TTY colors not supported'); +} + +ensureCwdIsProjectRoot(); +await spawnAndAssert( + fixtures.path('test-runner/output/coverage-width-80-color.mjs'), + specTransform, + { flags: ['--test-coverage-exclude=!test/**'], tty: true }, +); diff --git a/test/test-runner/test-output-coverage-width-80-uncovered-lines-color.mjs b/test/test-runner/test-output-coverage-width-80-uncovered-lines-color.mjs new file mode 100644 index 000000000000..1b2cb29620d6 --- /dev/null +++ b/test/test-runner/test-output-coverage-width-80-uncovered-lines-color.mjs @@ -0,0 +1,21 @@ +// Flags: --expose-internals +// Test that the output of test-runner/output/coverage-width-80-uncovered-lines-color.mjs matches +// test-runner/output/coverage-width-80-uncovered-lines-color.snapshot +import * as common from '../common/index.mjs'; +import * as fixtures from '../common/fixtures.mjs'; +import { spawnAndAssert, specTransform, canColorize, ensureCwdIsProjectRoot } from '../common/assertSnapshot.js'; + +if (!process.features.inspector) { + common.skip('inspector support required'); +} + +if (!canColorize()) { + common.skip('TTY colors not supported'); +} + +ensureCwdIsProjectRoot(); +await spawnAndAssert( + fixtures.path('test-runner/output/coverage-width-80-uncovered-lines-color.mjs'), + specTransform, + { flags: ['--test-coverage-exclude=!test/**'], tty: true }, +); diff --git a/test/test-runner/test-output-coverage-width-80-uncovered-lines.mjs b/test/test-runner/test-output-coverage-width-80-uncovered-lines.mjs new file mode 100644 index 000000000000..293a1bbc1060 --- /dev/null +++ b/test/test-runner/test-output-coverage-width-80-uncovered-lines.mjs @@ -0,0 +1,17 @@ +// Flags: --expose-internals +// Test that the output of test-runner/output/coverage-width-80-uncovered-lines.mjs matches +// test-runner/output/coverage-width-80-uncovered-lines.snapshot +import * as common from '../common/index.mjs'; +import * as fixtures from '../common/fixtures.mjs'; +import { spawnAndAssert, defaultTransform, ensureCwdIsProjectRoot } from '../common/assertSnapshot.js'; + +if (!process.features.inspector) { + common.skip('inspector support required'); +} + +ensureCwdIsProjectRoot(); +await spawnAndAssert( + fixtures.path('test-runner/output/coverage-width-80-uncovered-lines.mjs'), + defaultTransform, + { flags: ['--test-reporter=tap', '--test-coverage-exclude=!test/**'] }, +); diff --git a/test/test-runner/test-output-coverage-width-80.mjs b/test/test-runner/test-output-coverage-width-80.mjs new file mode 100644 index 000000000000..2a5e8f3ad92f --- /dev/null +++ b/test/test-runner/test-output-coverage-width-80.mjs @@ -0,0 +1,17 @@ +// Flags: --expose-internals +// Test that the output of test-runner/output/coverage-width-80.mjs matches +// test-runner/output/coverage-width-80.snapshot +import * as common from '../common/index.mjs'; +import * as fixtures from '../common/fixtures.mjs'; +import { spawnAndAssert, defaultTransform, ensureCwdIsProjectRoot } from '../common/assertSnapshot.js'; + +if (!process.features.inspector) { + common.skip('inspector support required'); +} + +ensureCwdIsProjectRoot(); +await spawnAndAssert( + fixtures.path('test-runner/output/coverage-width-80.mjs'), + defaultTransform, + { flags: ['--test-reporter=tap', '--test-coverage-exclude=!test/**'] }, +); diff --git a/test/test-runner/test-output-coverage-width-infinity-uncovered-lines.mjs b/test/test-runner/test-output-coverage-width-infinity-uncovered-lines.mjs new file mode 100644 index 000000000000..76ccc222c2df --- /dev/null +++ b/test/test-runner/test-output-coverage-width-infinity-uncovered-lines.mjs @@ -0,0 +1,17 @@ +// Flags: --expose-internals +// Test that the output of test-runner/output/coverage-width-infinity-uncovered-lines.mjs matches +// test-runner/output/coverage-width-infinity-uncovered-lines.snapshot +import * as common from '../common/index.mjs'; +import * as fixtures from '../common/fixtures.mjs'; +import { spawnAndAssert, defaultTransform, ensureCwdIsProjectRoot } from '../common/assertSnapshot.js'; + +if (!process.features.inspector) { + common.skip('inspector support required'); +} + +ensureCwdIsProjectRoot(); +await spawnAndAssert( + fixtures.path('test-runner/output/coverage-width-infinity-uncovered-lines.mjs'), + defaultTransform, + { flags: ['--test-reporter=tap', '--test-coverage-exclude=!test/**'] }, +); diff --git a/test/test-runner/test-output-coverage-width-infinity.mjs b/test/test-runner/test-output-coverage-width-infinity.mjs new file mode 100644 index 000000000000..d2b8ea700e37 --- /dev/null +++ b/test/test-runner/test-output-coverage-width-infinity.mjs @@ -0,0 +1,17 @@ +// Flags: --expose-internals +// Test that the output of test-runner/output/coverage-width-infinity.mjs matches +// test-runner/output/coverage-width-infinity.snapshot +import * as common from '../common/index.mjs'; +import * as fixtures from '../common/fixtures.mjs'; +import { spawnAndAssert, defaultTransform, ensureCwdIsProjectRoot } from '../common/assertSnapshot.js'; + +if (!process.features.inspector) { + common.skip('inspector support required'); +} + +ensureCwdIsProjectRoot(); +await spawnAndAssert( + fixtures.path('test-runner/output/coverage-width-infinity.mjs'), + defaultTransform, + { flags: ['--test-reporter=tap', '--test-coverage-exclude=!test/**'] }, +); diff --git a/test/test-runner/test-output-coverage-with-mock.mjs b/test/test-runner/test-output-coverage-with-mock.mjs new file mode 100644 index 000000000000..d75cccb06a4a --- /dev/null +++ b/test/test-runner/test-output-coverage-with-mock.mjs @@ -0,0 +1,26 @@ +// Flags: --expose-internals +// Test that the output of test-runner/output/coverage-with-mock.mjs matches +// test-runner/output/coverage-with-mock.snapshot +import * as common from '../common/index.mjs'; +import * as fixtures from '../common/fixtures.mjs'; +import { spawnAndAssert, defaultTransform, ensureCwdIsProjectRoot } from '../common/assertSnapshot.js'; + +if (!process.features.inspector) { + common.skip('inspector support required'); +} + +ensureCwdIsProjectRoot(); +await spawnAndAssert( + fixtures.path('test-runner/output/coverage-with-mock.mjs'), + defaultTransform, + { + flags: [ + '--disable-warning=ExperimentalWarning', + '--test-reporter=tap', + '--experimental-transform-types', + '--experimental-test-module-mocks', + '--experimental-test-coverage', + '--test-coverage-exclude=!test/**', + ], + }, +); diff --git a/test/test-runner/test-output-default-output.mjs b/test/test-runner/test-output-default-output.mjs new file mode 100644 index 000000000000..065dbd65902b --- /dev/null +++ b/test/test-runner/test-output-default-output.mjs @@ -0,0 +1,12 @@ +// Flags: --expose-internals +// Test that the output of test-runner/output/default_output.js matches test-runner/output/default_output.snapshot +import '../common/index.mjs'; +import * as fixtures from '../common/fixtures.mjs'; +import { spawnAndAssert, specTransform, ensureCwdIsProjectRoot } from '../common/assertSnapshot.js'; + +ensureCwdIsProjectRoot(); +await spawnAndAssert( + fixtures.path('test-runner/output/default_output.js'), + specTransform, + { tty: true }, +); diff --git a/test/test-runner/test-output-describe-it.mjs b/test/test-runner/test-output-describe-it.mjs new file mode 100644 index 000000000000..0fdda4711593 --- /dev/null +++ b/test/test-runner/test-output-describe-it.mjs @@ -0,0 +1,12 @@ +// Flags: --expose-internals +// Test that the output of test-runner/output/describe_it.js matches test-runner/output/describe_it.snapshot +import '../common/index.mjs'; +import * as fixtures from '../common/fixtures.mjs'; +import { spawnAndAssert, defaultTransform, ensureCwdIsProjectRoot } from '../common/assertSnapshot.js'; + +ensureCwdIsProjectRoot(); +await spawnAndAssert( + fixtures.path('test-runner/output/describe_it.js'), + defaultTransform, + { flags: ['--test-reporter=tap'] }, +); diff --git a/test/test-runner/test-output-describe-nested.mjs b/test/test-runner/test-output-describe-nested.mjs new file mode 100644 index 000000000000..56489182978c --- /dev/null +++ b/test/test-runner/test-output-describe-nested.mjs @@ -0,0 +1,12 @@ +// Flags: --expose-internals +// Test that the output of test-runner/output/describe_nested.js matches test-runner/output/describe_nested.snapshot +import '../common/index.mjs'; +import * as fixtures from '../common/fixtures.mjs'; +import { spawnAndAssert, defaultTransform, ensureCwdIsProjectRoot } from '../common/assertSnapshot.js'; + +ensureCwdIsProjectRoot(); +await spawnAndAssert( + fixtures.path('test-runner/output/describe_nested.js'), + defaultTransform, + { flags: ['--test-reporter=tap'] }, +); diff --git a/test/test-runner/test-output-dot-output-custom-columns.mjs b/test/test-runner/test-output-dot-output-custom-columns.mjs new file mode 100644 index 000000000000..7a3bdf40d879 --- /dev/null +++ b/test/test-runner/test-output-dot-output-custom-columns.mjs @@ -0,0 +1,13 @@ +// Flags: --expose-internals +// Test that the output of test-runner/output/dot_output_custom_columns.js matches +// test-runner/output/dot_output_custom_columns.snapshot +import '../common/index.mjs'; +import * as fixtures from '../common/fixtures.mjs'; +import { spawnAndAssert, specTransform, ensureCwdIsProjectRoot } from '../common/assertSnapshot.js'; + +ensureCwdIsProjectRoot(); +await spawnAndAssert( + fixtures.path('test-runner/output/dot_output_custom_columns.js'), + specTransform, + { tty: true }, +); diff --git a/test/test-runner/test-output-dot-reporter.mjs b/test/test-runner/test-output-dot-reporter.mjs new file mode 100644 index 000000000000..b27b4d7a3488 --- /dev/null +++ b/test/test-runner/test-output-dot-reporter.mjs @@ -0,0 +1,11 @@ +// Flags: --expose-internals +// Test that the output of test-runner/output/dot_reporter.js matches test-runner/output/dot_reporter.snapshot +import '../common/index.mjs'; +import * as fixtures from '../common/fixtures.mjs'; +import { spawnAndAssert, specTransform, ensureCwdIsProjectRoot } from '../common/assertSnapshot.js'; + +ensureCwdIsProjectRoot(); +await spawnAndAssert( + fixtures.path('test-runner/output/dot_reporter.js'), + specTransform, +); diff --git a/test/test-runner/test-output-eval-dot.mjs b/test/test-runner/test-output-eval-dot.mjs new file mode 100644 index 000000000000..9734b1940c80 --- /dev/null +++ b/test/test-runner/test-output-eval-dot.mjs @@ -0,0 +1,11 @@ +// Flags: --expose-internals +// Test that the output of test-runner/output/eval_dot.js matches test-runner/output/eval_dot.snapshot +import '../common/index.mjs'; +import * as fixtures from '../common/fixtures.mjs'; +import { spawnAndAssert, specTransform, ensureCwdIsProjectRoot } from '../common/assertSnapshot.js'; + +ensureCwdIsProjectRoot(); +await spawnAndAssert( + fixtures.path('test-runner/output/eval_dot.js'), + specTransform, +); diff --git a/test/test-runner/test-output-eval-spec.mjs b/test/test-runner/test-output-eval-spec.mjs new file mode 100644 index 000000000000..623fa10b6b9a --- /dev/null +++ b/test/test-runner/test-output-eval-spec.mjs @@ -0,0 +1,11 @@ +// Flags: --expose-internals +// Test that the output of test-runner/output/eval_spec.js matches test-runner/output/eval_spec.snapshot +import '../common/index.mjs'; +import * as fixtures from '../common/fixtures.mjs'; +import { spawnAndAssert, specTransform, ensureCwdIsProjectRoot } from '../common/assertSnapshot.js'; + +ensureCwdIsProjectRoot(); +await spawnAndAssert( + fixtures.path('test-runner/output/eval_spec.js'), + specTransform, +); diff --git a/test/test-runner/test-output-eval-tap.mjs b/test/test-runner/test-output-eval-tap.mjs new file mode 100644 index 000000000000..e32f262b361c --- /dev/null +++ b/test/test-runner/test-output-eval-tap.mjs @@ -0,0 +1,11 @@ +// Flags: --expose-internals +// Test that the output of test-runner/output/eval_tap.js matches test-runner/output/eval_tap.snapshot +import '../common/index.mjs'; +import * as fixtures from '../common/fixtures.mjs'; +import { spawnAndAssert, defaultTransform, ensureCwdIsProjectRoot } from '../common/assertSnapshot.js'; + +ensureCwdIsProjectRoot(); +await spawnAndAssert( + fixtures.path('test-runner/output/eval_tap.js'), + defaultTransform, +); diff --git a/test/test-runner/test-output-filtered-suite-delayed-build.mjs b/test/test-runner/test-output-filtered-suite-delayed-build.mjs new file mode 100644 index 000000000000..f13b9cc7eecf --- /dev/null +++ b/test/test-runner/test-output-filtered-suite-delayed-build.mjs @@ -0,0 +1,13 @@ +// Flags: --expose-internals +// Test that the output of test-runner/output/filtered-suite-delayed-build.js matches +// test-runner/output/filtered-suite-delayed-build.snapshot +import '../common/index.mjs'; +import * as fixtures from '../common/fixtures.mjs'; +import { spawnAndAssert, defaultTransform, ensureCwdIsProjectRoot } from '../common/assertSnapshot.js'; + +ensureCwdIsProjectRoot(); +await spawnAndAssert( + fixtures.path('test-runner/output/filtered-suite-delayed-build.js'), + defaultTransform, + { flags: ['--test-reporter=tap'] }, +); diff --git a/test/test-runner/test-output-filtered-suite-order.mjs b/test/test-runner/test-output-filtered-suite-order.mjs new file mode 100644 index 000000000000..0ccffe365fea --- /dev/null +++ b/test/test-runner/test-output-filtered-suite-order.mjs @@ -0,0 +1,13 @@ +// Flags: --expose-internals +// Test that the output of test-runner/output/filtered-suite-order.mjs matches +// test-runner/output/filtered-suite-order.snapshot +import '../common/index.mjs'; +import * as fixtures from '../common/fixtures.mjs'; +import { spawnAndAssert, defaultTransform, ensureCwdIsProjectRoot } from '../common/assertSnapshot.js'; + +ensureCwdIsProjectRoot(); +await spawnAndAssert( + fixtures.path('test-runner/output/filtered-suite-order.mjs'), + defaultTransform, + { flags: ['--test-reporter=tap'] }, +); diff --git a/test/test-runner/test-output-filtered-suite-throws.mjs b/test/test-runner/test-output-filtered-suite-throws.mjs new file mode 100644 index 000000000000..729fdee1265b --- /dev/null +++ b/test/test-runner/test-output-filtered-suite-throws.mjs @@ -0,0 +1,13 @@ +// Flags: --expose-internals +// Test that the output of test-runner/output/filtered-suite-throws.js matches +// test-runner/output/filtered-suite-throws.snapshot +import '../common/index.mjs'; +import * as fixtures from '../common/fixtures.mjs'; +import { spawnAndAssert, defaultTransform, ensureCwdIsProjectRoot } from '../common/assertSnapshot.js'; + +ensureCwdIsProjectRoot(); +await spawnAndAssert( + fixtures.path('test-runner/output/filtered-suite-throws.js'), + defaultTransform, + { flags: ['--test-reporter=tap'] }, +); diff --git a/test/test-runner/test-output-force-exit.mjs b/test/test-runner/test-output-force-exit.mjs new file mode 100644 index 000000000000..8321dc55f2a7 --- /dev/null +++ b/test/test-runner/test-output-force-exit.mjs @@ -0,0 +1,11 @@ +// Flags: --expose-internals +// Test that the output of test-runner/output/force_exit.js matches test-runner/output/force_exit.snapshot +import '../common/index.mjs'; +import * as fixtures from '../common/fixtures.mjs'; +import { spawnAndAssert, specTransform, ensureCwdIsProjectRoot } from '../common/assertSnapshot.js'; + +ensureCwdIsProjectRoot(); +await spawnAndAssert( + fixtures.path('test-runner/output/force_exit.js'), + specTransform, +); diff --git a/test/test-runner/test-output-global-after-should-fail-the-test.mjs b/test/test-runner/test-output-global-after-should-fail-the-test.mjs new file mode 100644 index 000000000000..f2b86d20e8d5 --- /dev/null +++ b/test/test-runner/test-output-global-after-should-fail-the-test.mjs @@ -0,0 +1,13 @@ +// Flags: --expose-internals +// Test that the output of test-runner/output/global_after_should_fail_the_test.js matches +// test-runner/output/global_after_should_fail_the_test.snapshot +import '../common/index.mjs'; +import * as fixtures from '../common/fixtures.mjs'; +import { spawnAndAssert, defaultTransform, ensureCwdIsProjectRoot } from '../common/assertSnapshot.js'; + +ensureCwdIsProjectRoot(); +await spawnAndAssert( + fixtures.path('test-runner/output/global_after_should_fail_the_test.js'), + defaultTransform, + { flags: ['--test-reporter=tap'] }, +); diff --git a/test/test-runner/test-output-global-hooks-with-no-tests.mjs b/test/test-runner/test-output-global-hooks-with-no-tests.mjs new file mode 100644 index 000000000000..280a755ad723 --- /dev/null +++ b/test/test-runner/test-output-global-hooks-with-no-tests.mjs @@ -0,0 +1,13 @@ +// Flags: --expose-internals +// Test that the output of test-runner/output/global-hooks-with-no-tests.js matches +// test-runner/output/global-hooks-with-no-tests.snapshot +import '../common/index.mjs'; +import * as fixtures from '../common/fixtures.mjs'; +import { spawnAndAssert, defaultTransform, ensureCwdIsProjectRoot } from '../common/assertSnapshot.js'; + +ensureCwdIsProjectRoot(); +await spawnAndAssert( + fixtures.path('test-runner/output/global-hooks-with-no-tests.js'), + defaultTransform, + { flags: ['--test-reporter=tap'] }, +); diff --git a/test/test-runner/test-output-hooks-spec-reporter.mjs b/test/test-runner/test-output-hooks-spec-reporter.mjs new file mode 100644 index 000000000000..87e115aa0f03 --- /dev/null +++ b/test/test-runner/test-output-hooks-spec-reporter.mjs @@ -0,0 +1,12 @@ +// Flags: --expose-internals +// Test that the output of test-runner/output/hooks_spec_reporter.js matches +// test-runner/output/hooks_spec_reporter.snapshot +import '../common/index.mjs'; +import * as fixtures from '../common/fixtures.mjs'; +import { spawnAndAssert, specTransform, ensureCwdIsProjectRoot } from '../common/assertSnapshot.js'; + +ensureCwdIsProjectRoot(); +await spawnAndAssert( + fixtures.path('test-runner/output/hooks_spec_reporter.js'), + specTransform, +); diff --git a/test/test-runner/test-output-hooks-with-no-global-test.mjs b/test/test-runner/test-output-hooks-with-no-global-test.mjs new file mode 100644 index 000000000000..f21cee7fae2c --- /dev/null +++ b/test/test-runner/test-output-hooks-with-no-global-test.mjs @@ -0,0 +1,13 @@ +// Flags: --expose-internals +// Test that the output of test-runner/output/hooks-with-no-global-test.js matches +// test-runner/output/hooks-with-no-global-test.snapshot +import '../common/index.mjs'; +import * as fixtures from '../common/fixtures.mjs'; +import { spawnAndAssert, defaultTransform, ensureCwdIsProjectRoot } from '../common/assertSnapshot.js'; + +ensureCwdIsProjectRoot(); +await spawnAndAssert( + fixtures.path('test-runner/output/hooks-with-no-global-test.js'), + defaultTransform, + { flags: ['--test-reporter=tap'] }, +); diff --git a/test/test-runner/test-output-hooks.mjs b/test/test-runner/test-output-hooks.mjs new file mode 100644 index 000000000000..5b60aac79987 --- /dev/null +++ b/test/test-runner/test-output-hooks.mjs @@ -0,0 +1,12 @@ +// Flags: --expose-internals +// Test that the output of test-runner/output/hooks.js matches test-runner/output/hooks.snapshot +import '../common/index.mjs'; +import * as fixtures from '../common/fixtures.mjs'; +import { spawnAndAssert, defaultTransform, ensureCwdIsProjectRoot } from '../common/assertSnapshot.js'; + +ensureCwdIsProjectRoot(); +await spawnAndAssert( + fixtures.path('test-runner/output/hooks.js'), + defaultTransform, + { flags: ['--test-reporter=tap'] }, +); diff --git a/test/test-runner/test-output-junit-reporter.mjs b/test/test-runner/test-output-junit-reporter.mjs new file mode 100644 index 000000000000..5a9b453ffe78 --- /dev/null +++ b/test/test-runner/test-output-junit-reporter.mjs @@ -0,0 +1,12 @@ +// Flags: --expose-internals +// Test that the output of test-runner/output/junit_reporter.js matches +// test-runner/output/junit_reporter.snapshot +import '../common/index.mjs'; +import * as fixtures from '../common/fixtures.mjs'; +import { spawnAndAssert, junitTransform, ensureCwdIsProjectRoot } from '../common/assertSnapshot.js'; + +ensureCwdIsProjectRoot(); +await spawnAndAssert( + fixtures.path('test-runner/output/junit_reporter.js'), + junitTransform, +); diff --git a/test/test-runner/test-output-lcov-reporter.mjs b/test/test-runner/test-output-lcov-reporter.mjs new file mode 100644 index 000000000000..08c1188d00e7 --- /dev/null +++ b/test/test-runner/test-output-lcov-reporter.mjs @@ -0,0 +1,15 @@ +// Flags: --expose-internals +// Test that the output of test-runner/output/lcov_reporter.js matches test-runner/output/lcov_reporter.snapshot +import * as common from '../common/index.mjs'; +import * as fixtures from '../common/fixtures.mjs'; +import { spawnAndAssert, lcovTransform, ensureCwdIsProjectRoot } from '../common/assertSnapshot.js'; + +if (!process.features.inspector) { + common.skip('inspector support required'); +} + +ensureCwdIsProjectRoot(); +await spawnAndAssert( + fixtures.path('test-runner/output/lcov_reporter.js'), + lcovTransform, +); diff --git a/test/test-runner/test-output-name-and-skip-patterns.mjs b/test/test-runner/test-output-name-and-skip-patterns.mjs new file mode 100644 index 000000000000..403918e3882b --- /dev/null +++ b/test/test-runner/test-output-name-and-skip-patterns.mjs @@ -0,0 +1,13 @@ +// Flags: --expose-internals +// Test that the output of test-runner/output/name_and_skip_patterns.js matches +// test-runner/output/name_and_skip_patterns.snapshot +import '../common/index.mjs'; +import * as fixtures from '../common/fixtures.mjs'; +import { spawnAndAssert, defaultTransform, ensureCwdIsProjectRoot } from '../common/assertSnapshot.js'; + +ensureCwdIsProjectRoot(); +await spawnAndAssert( + fixtures.path('test-runner/output/name_and_skip_patterns.js'), + defaultTransform, + { flags: ['--test-reporter=tap'] }, +); diff --git a/test/test-runner/test-output-name-pattern-with-only.mjs b/test/test-runner/test-output-name-pattern-with-only.mjs new file mode 100644 index 000000000000..f9571e6dce80 --- /dev/null +++ b/test/test-runner/test-output-name-pattern-with-only.mjs @@ -0,0 +1,13 @@ +// Flags: --expose-internals +// Test that the output of test-runner/output/name_pattern_with_only.js matches +// test-runner/output/name_pattern_with_only.snapshot +import '../common/index.mjs'; +import * as fixtures from '../common/fixtures.mjs'; +import { spawnAndAssert, defaultTransform, ensureCwdIsProjectRoot } from '../common/assertSnapshot.js'; + +ensureCwdIsProjectRoot(); +await spawnAndAssert( + fixtures.path('test-runner/output/name_pattern_with_only.js'), + defaultTransform, + { flags: ['--test-reporter=tap'] }, +); diff --git a/test/test-runner/test-output-name-pattern.mjs b/test/test-runner/test-output-name-pattern.mjs new file mode 100644 index 000000000000..70dc063d51ba --- /dev/null +++ b/test/test-runner/test-output-name-pattern.mjs @@ -0,0 +1,12 @@ +// Flags: --expose-internals +// Test that the output of test-runner/output/name_pattern.js matches test-runner/output/name_pattern.snapshot +import '../common/index.mjs'; +import * as fixtures from '../common/fixtures.mjs'; +import { spawnAndAssert, defaultTransform, ensureCwdIsProjectRoot } from '../common/assertSnapshot.js'; + +ensureCwdIsProjectRoot(); +await spawnAndAssert( + fixtures.path('test-runner/output/name_pattern.js'), + defaultTransform, + { flags: ['--test-reporter=tap'] }, +); diff --git a/test/test-runner/test-output-no-refs.mjs b/test/test-runner/test-output-no-refs.mjs new file mode 100644 index 000000000000..0ac276dc74a1 --- /dev/null +++ b/test/test-runner/test-output-no-refs.mjs @@ -0,0 +1,12 @@ +// Flags: --expose-internals +// Test that the output of test-runner/output/no_refs.js matches test-runner/output/no_refs.snapshot +import '../common/index.mjs'; +import * as fixtures from '../common/fixtures.mjs'; +import { spawnAndAssert, defaultTransform, ensureCwdIsProjectRoot } from '../common/assertSnapshot.js'; + +ensureCwdIsProjectRoot(); +await spawnAndAssert( + fixtures.path('test-runner/output/no_refs.js'), + defaultTransform, + { flags: ['--test-reporter=tap'] }, +); diff --git a/test/test-runner/test-output-no-tests.mjs b/test/test-runner/test-output-no-tests.mjs new file mode 100644 index 000000000000..846314ce470c --- /dev/null +++ b/test/test-runner/test-output-no-tests.mjs @@ -0,0 +1,12 @@ +// Flags: --expose-internals +// Test that the output of test-runner/output/no_tests.js matches test-runner/output/no_tests.snapshot +import '../common/index.mjs'; +import * as fixtures from '../common/fixtures.mjs'; +import { spawnAndAssert, defaultTransform, ensureCwdIsProjectRoot } from '../common/assertSnapshot.js'; + +ensureCwdIsProjectRoot(); +await spawnAndAssert( + fixtures.path('test-runner/output/no_tests.js'), + defaultTransform, + { flags: ['--test-reporter=tap'] }, +); diff --git a/test/test-runner/test-output-non-tty-forced-color-output.mjs b/test/test-runner/test-output-non-tty-forced-color-output.mjs new file mode 100644 index 000000000000..be8cd8e8d2fa --- /dev/null +++ b/test/test-runner/test-output-non-tty-forced-color-output.mjs @@ -0,0 +1,12 @@ +// Flags: --expose-internals +// Test that the output of test-runner/output/non-tty-forced-color-output.js matches +// test-runner/output/non-tty-forced-color-output.snapshot +import '../common/index.mjs'; +import * as fixtures from '../common/fixtures.mjs'; +import { spawnAndAssert, specTransform, ensureCwdIsProjectRoot } from '../common/assertSnapshot.js'; + +ensureCwdIsProjectRoot(); +await spawnAndAssert( + fixtures.path('test-runner/output/non-tty-forced-color-output.js'), + specTransform, +); diff --git a/test/test-runner/test-output-only-tests.mjs b/test/test-runner/test-output-only-tests.mjs new file mode 100644 index 000000000000..5aedb23853b5 --- /dev/null +++ b/test/test-runner/test-output-only-tests.mjs @@ -0,0 +1,12 @@ +// Flags: --expose-internals +// Test that the output of test-runner/output/only_tests.js matches test-runner/output/only_tests.snapshot +import '../common/index.mjs'; +import * as fixtures from '../common/fixtures.mjs'; +import { spawnAndAssert, defaultTransform, ensureCwdIsProjectRoot } from '../common/assertSnapshot.js'; + +ensureCwdIsProjectRoot(); +await spawnAndAssert( + fixtures.path('test-runner/output/only_tests.js'), + defaultTransform, + { flags: ['--test-reporter=tap'] }, +); diff --git a/test/test-runner/test-output-output-cli.mjs b/test/test-runner/test-output-output-cli.mjs new file mode 100644 index 000000000000..db243a2972de --- /dev/null +++ b/test/test-runner/test-output-output-cli.mjs @@ -0,0 +1,11 @@ +// Flags: --expose-internals +// Test that the output of test-runner/output/output_cli.js matches test-runner/output/output_cli.snapshot +import '../common/index.mjs'; +import * as fixtures from '../common/fixtures.mjs'; +import { spawnAndAssert, defaultTransform, ensureCwdIsProjectRoot } from '../common/assertSnapshot.js'; + +ensureCwdIsProjectRoot(); +await spawnAndAssert( + fixtures.path('test-runner/output/output_cli.js'), + defaultTransform, +); diff --git a/test/test-runner/test-output-output.mjs b/test/test-runner/test-output-output.mjs new file mode 100644 index 000000000000..8db6bbe6f423 --- /dev/null +++ b/test/test-runner/test-output-output.mjs @@ -0,0 +1,12 @@ +// Flags: --expose-internals +// Test that the output of test-runner/output/output.js matches test-runner/output/output.snapshot +import '../common/index.mjs'; +import * as fixtures from '../common/fixtures.mjs'; +import { spawnAndAssert, defaultTransform, ensureCwdIsProjectRoot } from '../common/assertSnapshot.js'; + +ensureCwdIsProjectRoot(); +await spawnAndAssert( + fixtures.path('test-runner/output/output.js'), + defaultTransform, + { flags: ['--test-reporter=tap'] }, +); diff --git a/test/test-runner/test-output-skip-each-hooks.mjs b/test/test-runner/test-output-skip-each-hooks.mjs new file mode 100644 index 000000000000..7227a0b129ae --- /dev/null +++ b/test/test-runner/test-output-skip-each-hooks.mjs @@ -0,0 +1,12 @@ +// Flags: --expose-internals +// Test that the output of test-runner/output/skip-each-hooks.js matches +// test-runner/output/skip-each-hooks.snapshot +import '../common/index.mjs'; +import * as fixtures from '../common/fixtures.mjs'; +import { spawnAndAssert, specTransform, ensureCwdIsProjectRoot } from '../common/assertSnapshot.js'; + +ensureCwdIsProjectRoot(); +await spawnAndAssert( + fixtures.path('test-runner/output/skip-each-hooks.js'), + specTransform, +); diff --git a/test/test-runner/test-output-skip-pattern.mjs b/test/test-runner/test-output-skip-pattern.mjs new file mode 100644 index 000000000000..0a601f969087 --- /dev/null +++ b/test/test-runner/test-output-skip-pattern.mjs @@ -0,0 +1,12 @@ +// Flags: --expose-internals +// Test that the output of test-runner/output/skip_pattern.js matches test-runner/output/skip_pattern.snapshot +import '../common/index.mjs'; +import * as fixtures from '../common/fixtures.mjs'; +import { spawnAndAssert, defaultTransform, ensureCwdIsProjectRoot } from '../common/assertSnapshot.js'; + +ensureCwdIsProjectRoot(); +await spawnAndAssert( + fixtures.path('test-runner/output/skip_pattern.js'), + defaultTransform, + { flags: ['--test-reporter=tap'] }, +); diff --git a/test/test-runner/test-output-source-mapped-locations.mjs b/test/test-runner/test-output-source-mapped-locations.mjs new file mode 100644 index 000000000000..d0a8bdc66ccf --- /dev/null +++ b/test/test-runner/test-output-source-mapped-locations.mjs @@ -0,0 +1,13 @@ +// Flags: --expose-internals +// Test that the output of test-runner/output/source_mapped_locations.mjs matches +// test-runner/output/source_mapped_locations.snapshot +import '../common/index.mjs'; +import * as fixtures from '../common/fixtures.mjs'; +import { spawnAndAssert, defaultTransform, ensureCwdIsProjectRoot } from '../common/assertSnapshot.js'; + +ensureCwdIsProjectRoot(); +await spawnAndAssert( + fixtures.path('test-runner/output/source_mapped_locations.mjs'), + defaultTransform, + { flags: ['--test-reporter=tap'] }, +); diff --git a/test/test-runner/test-output-spec-reporter-cli.mjs b/test/test-runner/test-output-spec-reporter-cli.mjs new file mode 100644 index 000000000000..acf00c55c158 --- /dev/null +++ b/test/test-runner/test-output-spec-reporter-cli.mjs @@ -0,0 +1,12 @@ +// Flags: --expose-internals +// Test that the output of test-runner/output/spec_reporter_cli.js matches +// test-runner/output/spec_reporter_cli.snapshot +import '../common/index.mjs'; +import * as fixtures from '../common/fixtures.mjs'; +import { spawnAndAssert, specTransform, ensureCwdIsProjectRoot } from '../common/assertSnapshot.js'; + +ensureCwdIsProjectRoot(); +await spawnAndAssert( + fixtures.path('test-runner/output/spec_reporter_cli.js'), + specTransform, +); diff --git a/test/test-runner/test-output-spec-reporter-successful.mjs b/test/test-runner/test-output-spec-reporter-successful.mjs new file mode 100644 index 000000000000..4c15a8d6dc67 --- /dev/null +++ b/test/test-runner/test-output-spec-reporter-successful.mjs @@ -0,0 +1,12 @@ +// Flags: --expose-internals +// Test that the output of test-runner/output/spec_reporter_successful.js matches +// test-runner/output/spec_reporter_successful.snapshot +import '../common/index.mjs'; +import * as fixtures from '../common/fixtures.mjs'; +import { spawnAndAssert, specTransform, ensureCwdIsProjectRoot } from '../common/assertSnapshot.js'; + +ensureCwdIsProjectRoot(); +await spawnAndAssert( + fixtures.path('test-runner/output/spec_reporter_successful.js'), + specTransform, +); diff --git a/test/test-runner/test-output-spec-reporter.mjs b/test/test-runner/test-output-spec-reporter.mjs new file mode 100644 index 000000000000..efc9cae34bc0 --- /dev/null +++ b/test/test-runner/test-output-spec-reporter.mjs @@ -0,0 +1,11 @@ +// Flags: --expose-internals +// Test that the output of test-runner/output/spec_reporter.js matches test-runner/output/spec_reporter.snapshot +import '../common/index.mjs'; +import * as fixtures from '../common/fixtures.mjs'; +import { spawnAndAssert, specTransform, ensureCwdIsProjectRoot } from '../common/assertSnapshot.js'; + +ensureCwdIsProjectRoot(); +await spawnAndAssert( + fixtures.path('test-runner/output/spec_reporter.js'), + specTransform, +); diff --git a/test/test-runner/test-output-suite-skip-hooks.mjs b/test/test-runner/test-output-suite-skip-hooks.mjs new file mode 100644 index 000000000000..33d67bc41bef --- /dev/null +++ b/test/test-runner/test-output-suite-skip-hooks.mjs @@ -0,0 +1,12 @@ +// Flags: --expose-internals +// Test that the output of test-runner/output/suite-skip-hooks.js matches +// test-runner/output/suite-skip-hooks.snapshot +import '../common/index.mjs'; +import * as fixtures from '../common/fixtures.mjs'; +import { spawnAndAssert, specTransform, ensureCwdIsProjectRoot } from '../common/assertSnapshot.js'; + +ensureCwdIsProjectRoot(); +await spawnAndAssert( + fixtures.path('test-runner/output/suite-skip-hooks.js'), + specTransform, +); diff --git a/test/test-runner/test-output-tap-escape.mjs b/test/test-runner/test-output-tap-escape.mjs new file mode 100644 index 000000000000..bbbc23fbdd53 --- /dev/null +++ b/test/test-runner/test-output-tap-escape.mjs @@ -0,0 +1,18 @@ +// Flags: --expose-internals +// Test that the output of test-runner/output/tap_escape.js matches test-runner/output/tap_escape.snapshot +import '../common/index.mjs'; +import * as fixtures from '../common/fixtures.mjs'; +import { + spawnAndAssert, + transform, + replaceWindowsLineEndings, + replaceTestDuration, + ensureCwdIsProjectRoot, +} from '../common/assertSnapshot.js'; + +ensureCwdIsProjectRoot(); +await spawnAndAssert( + fixtures.path('test-runner/output/tap_escape.js'), + transform(replaceWindowsLineEndings, replaceTestDuration), + { flags: ['--test-reporter=tap'] }, +); diff --git a/test/test-runner/test-output-test-diagnostic-warning-without-test-only-flag.mjs b/test/test-runner/test-output-test-diagnostic-warning-without-test-only-flag.mjs new file mode 100644 index 000000000000..4a7b781900cb --- /dev/null +++ b/test/test-runner/test-output-test-diagnostic-warning-without-test-only-flag.mjs @@ -0,0 +1,13 @@ +// Flags: --expose-internals +// Test that the output of test-runner/output/test-diagnostic-warning-without-test-only-flag.js matches +// test-runner/output/test-diagnostic-warning-without-test-only-flag.snapshot +import '../common/index.mjs'; +import * as fixtures from '../common/fixtures.mjs'; +import { spawnAndAssert, defaultTransform, ensureCwdIsProjectRoot } from '../common/assertSnapshot.js'; + +ensureCwdIsProjectRoot(); +await spawnAndAssert( + fixtures.path('test-runner/output/test-diagnostic-warning-without-test-only-flag.js'), + defaultTransform, + { flags: ['--test', '--test-reporter=tap'] }, +); diff --git a/test/test-runner/test-output-test-runner-plan-timeout.mjs b/test/test-runner/test-output-test-runner-plan-timeout.mjs new file mode 100644 index 000000000000..f947f16617ab --- /dev/null +++ b/test/test-runner/test-output-test-runner-plan-timeout.mjs @@ -0,0 +1,13 @@ +// Flags: --expose-internals +// Test that the output of test-runner/output/test-runner-plan-timeout.js matches +// test-runner/output/test-runner-plan-timeout.snapshot +import '../common/index.mjs'; +import * as fixtures from '../common/fixtures.mjs'; +import { spawnAndAssert, defaultTransform, ensureCwdIsProjectRoot } from '../common/assertSnapshot.js'; + +ensureCwdIsProjectRoot(); +await spawnAndAssert( + fixtures.path('test-runner/output/test-runner-plan-timeout.js'), + defaultTransform, + { flags: ['--test-reporter=tap', '--test-force-exit'] }, +); diff --git a/test/test-runner/test-output-test-runner-plan.mjs b/test/test-runner/test-output-test-runner-plan.mjs new file mode 100644 index 000000000000..e06b44ff9768 --- /dev/null +++ b/test/test-runner/test-output-test-runner-plan.mjs @@ -0,0 +1,13 @@ +// Flags: --expose-internals +// Test that the output of test-runner/output/test-runner-plan.js matches +// test-runner/output/test-runner-plan.snapshot +import '../common/index.mjs'; +import * as fixtures from '../common/fixtures.mjs'; +import { spawnAndAssert, defaultTransform, ensureCwdIsProjectRoot } from '../common/assertSnapshot.js'; + +ensureCwdIsProjectRoot(); +await spawnAndAssert( + fixtures.path('test-runner/output/test-runner-plan.js'), + defaultTransform, + { flags: ['--test-reporter=tap'] }, +); diff --git a/test/test-runner/test-output-test-runner-watch-spec.mjs b/test/test-runner/test-output-test-runner-watch-spec.mjs new file mode 100644 index 000000000000..2a2f9527e47e --- /dev/null +++ b/test/test-runner/test-output-test-runner-watch-spec.mjs @@ -0,0 +1,12 @@ +// Flags: --expose-internals +// Test that the output of test-runner/output/test-runner-watch-spec.mjs matches +// test-runner/output/test-runner-watch-spec.snapshot +import '../common/index.mjs'; +import * as fixtures from '../common/fixtures.mjs'; +import { spawnAndAssert, specTransform, ensureCwdIsProjectRoot } from '../common/assertSnapshot.js'; + +ensureCwdIsProjectRoot(); +await spawnAndAssert( + fixtures.path('test-runner/output/test-runner-watch-spec.mjs'), + specTransform, +); diff --git a/test/test-runner/test-output-test-timeout-flag-with-test.mjs b/test/test-runner/test-output-test-timeout-flag-with-test.mjs new file mode 100644 index 000000000000..493c057e0bdb --- /dev/null +++ b/test/test-runner/test-output-test-timeout-flag-with-test.mjs @@ -0,0 +1,14 @@ +// Flags: --expose-internals +// Test that the output of test-runner/output/test-timeout-flag.js matches +// test-runner/output/test-timeout-flag.snapshot with --test flag. +// --test-timeout should work with or without --test flag. +import '../common/index.mjs'; +import * as fixtures from '../common/fixtures.mjs'; +import { spawnAndAssert, defaultTransform, ensureCwdIsProjectRoot } from '../common/assertSnapshot.js'; + +ensureCwdIsProjectRoot(); +await spawnAndAssert( + fixtures.path('test-runner/output/test-timeout-flag.js'), + defaultTransform, + { flags: ['--test-reporter=tap', '--test-timeout=100', '--test'] }, +); diff --git a/test/test-runner/test-output-test-timeout-flag.mjs b/test/test-runner/test-output-test-timeout-flag.mjs new file mode 100644 index 000000000000..93938cb44045 --- /dev/null +++ b/test/test-runner/test-output-test-timeout-flag.mjs @@ -0,0 +1,13 @@ +// Flags: --expose-internals +// Test that the output of test-runner/output/test-timeout-flag.js matches +// test-runner/output/test-timeout-flag.snapshot +import '../common/index.mjs'; +import * as fixtures from '../common/fixtures.mjs'; +import { spawnAndAssert, defaultTransform, ensureCwdIsProjectRoot } from '../common/assertSnapshot.js'; + +ensureCwdIsProjectRoot(); +await spawnAndAssert( + fixtures.path('test-runner/output/test-timeout-flag.js'), + defaultTransform, + { flags: ['--test-reporter=tap', '--test-timeout=100'] }, +); diff --git a/test/test-runner/test-output-timeout-in-before-each.mjs b/test/test-runner/test-output-timeout-in-before-each.mjs new file mode 100644 index 000000000000..916499f9d7e2 --- /dev/null +++ b/test/test-runner/test-output-timeout-in-before-each.mjs @@ -0,0 +1,13 @@ +// Flags: --expose-internals +// Test that the output of test-runner/output/timeout_in_before_each_should_not_affect_further_tests.js matches +// test-runner/output/timeout_in_before_each_should_not_affect_further_tests.snapshot +import '../common/index.mjs'; +import * as fixtures from '../common/fixtures.mjs'; +import { spawnAndAssert, defaultTransform, ensureCwdIsProjectRoot } from '../common/assertSnapshot.js'; + +ensureCwdIsProjectRoot(); +await spawnAndAssert( + fixtures.path('test-runner/output/timeout_in_before_each_should_not_affect_further_tests.js'), + defaultTransform, + { flags: ['--test-reporter=tap'] }, +); diff --git a/test/test-runner/test-output-typescript-coverage.mjs b/test/test-runner/test-output-typescript-coverage.mjs new file mode 100644 index 000000000000..e4c252cb73b0 --- /dev/null +++ b/test/test-runner/test-output-typescript-coverage.mjs @@ -0,0 +1,26 @@ +// Flags: --expose-internals +// Test that the output of test-runner/output/typescript-coverage.mts matches +// test-runner/output/typescript-coverage.snapshot +import * as common from '../common/index.mjs'; +import * as fixtures from '../common/fixtures.mjs'; +import { spawnAndAssert, defaultTransform, ensureCwdIsProjectRoot } from '../common/assertSnapshot.js'; + +if (!process.features.inspector) { + common.skip('inspector support required'); +} + +ensureCwdIsProjectRoot(); +await spawnAndAssert( + fixtures.path('test-runner/output/typescript-coverage.mts'), + defaultTransform, + { + flags: [ + '--disable-warning=ExperimentalWarning', + '--test-reporter=tap', + '--experimental-transform-types', + '--experimental-test-module-mocks', + '--experimental-test-coverage', + '--test-coverage-exclude=!test/**', + ], + }, +); diff --git a/test/test-runner/test-output-unfinished-suite-async-error.mjs b/test/test-runner/test-output-unfinished-suite-async-error.mjs new file mode 100644 index 000000000000..c8b4a1de5650 --- /dev/null +++ b/test/test-runner/test-output-unfinished-suite-async-error.mjs @@ -0,0 +1,13 @@ +// Flags: --expose-internals +// Test that the output of test-runner/output/unfinished-suite-async-error.js matches +// test-runner/output/unfinished-suite-async-error.snapshot +import '../common/index.mjs'; +import * as fixtures from '../common/fixtures.mjs'; +import { spawnAndAssert, defaultTransform, ensureCwdIsProjectRoot } from '../common/assertSnapshot.js'; + +ensureCwdIsProjectRoot(); +await spawnAndAssert( + fixtures.path('test-runner/output/unfinished-suite-async-error.js'), + defaultTransform, + { flags: ['--test-reporter=tap'] }, +); diff --git a/test/test-runner/test-runner.status b/test/test-runner/test-runner.status new file mode 100644 index 000000000000..65ae96eb9e37 --- /dev/null +++ b/test/test-runner/test-runner.status @@ -0,0 +1,7 @@ +prefix test-runner + +# To mark a test as flaky, list the test name in the appropriate section +# below, without ".js", followed by ": PASS,FLAKY". Example: +# sample-test : PASS,FLAKY + +[true] # This section applies to all platforms diff --git a/test/test-runner/testcfg.py b/test/test-runner/testcfg.py new file mode 100644 index 000000000000..fa53433d0dd1 --- /dev/null +++ b/test/test-runner/testcfg.py @@ -0,0 +1,6 @@ +import sys, os +sys.path.append(os.path.join(os.path.dirname(__file__), '..')) +import testpy + +def GetConfiguration(context, root): + return testpy.ParallelTestConfiguration(context, root, 'test-runner') From f6682715c9b1a68c3889097e8a4a5e4b320ff3c0 Mon Sep 17 00:00:00 2001 From: Joyee Cheung Date: Wed, 22 Oct 2025 21:31:36 +0200 Subject: [PATCH 3/3] fixup! test: split test-runner-output --- test/test-runner/test-output-abort-hooks.mjs | 1 - test/test-runner/test-output-abort-runs-after-hook.mjs | 1 - test/test-runner/test-output-abort-suite.mjs | 1 - test/test-runner/test-output-abort.mjs | 1 - test/test-runner/test-output-arbitrary-output-colored.mjs | 1 - test/test-runner/test-output-arbitrary-output.mjs | 1 - test/test-runner/test-output-async-test-scheduling.mjs | 1 - .../test-output-before-and-after-each-too-many-listeners.mjs | 1 - ...put-before-and-after-each-with-timeout-too-many-listeners.mjs | 1 - test/test-runner/test-output-coverage-failure.mjs | 1 - test/test-runner/test-output-coverage-short-filename.mjs | 1 - .../test-output-coverage-width-100-uncovered-lines.mjs | 1 - test/test-runner/test-output-coverage-width-100.mjs | 1 - .../test-output-coverage-width-150-uncovered-lines.mjs | 1 - test/test-runner/test-output-coverage-width-150.mjs | 1 - test/test-runner/test-output-coverage-width-40.mjs | 1 - .../test-output-coverage-width-80-uncovered-lines.mjs | 1 - test/test-runner/test-output-coverage-width-80.mjs | 1 - .../test-output-coverage-width-infinity-uncovered-lines.mjs | 1 - test/test-runner/test-output-coverage-width-infinity.mjs | 1 - test/test-runner/test-output-coverage-with-mock.mjs | 1 - test/test-runner/test-output-default-output.mjs | 1 - test/test-runner/test-output-describe-it.mjs | 1 - test/test-runner/test-output-describe-nested.mjs | 1 - test/test-runner/test-output-dot-output-custom-columns.mjs | 1 - test/test-runner/test-output-dot-reporter.mjs | 1 - test/test-runner/test-output-eval-dot.mjs | 1 - test/test-runner/test-output-eval-spec.mjs | 1 - test/test-runner/test-output-eval-tap.mjs | 1 - test/test-runner/test-output-filtered-suite-delayed-build.mjs | 1 - test/test-runner/test-output-filtered-suite-order.mjs | 1 - test/test-runner/test-output-filtered-suite-throws.mjs | 1 - test/test-runner/test-output-force-exit.mjs | 1 - .../test-output-global-after-should-fail-the-test.mjs | 1 - test/test-runner/test-output-global-hooks-with-no-tests.mjs | 1 - test/test-runner/test-output-hooks-spec-reporter.mjs | 1 - test/test-runner/test-output-hooks-with-no-global-test.mjs | 1 - test/test-runner/test-output-hooks.mjs | 1 - test/test-runner/test-output-junit-reporter.mjs | 1 - test/test-runner/test-output-lcov-reporter.mjs | 1 - test/test-runner/test-output-name-and-skip-patterns.mjs | 1 - test/test-runner/test-output-name-pattern-with-only.mjs | 1 - test/test-runner/test-output-name-pattern.mjs | 1 - test/test-runner/test-output-no-refs.mjs | 1 - test/test-runner/test-output-no-tests.mjs | 1 - test/test-runner/test-output-non-tty-forced-color-output.mjs | 1 - test/test-runner/test-output-only-tests.mjs | 1 - test/test-runner/test-output-output-cli.mjs | 1 - test/test-runner/test-output-output.mjs | 1 - test/test-runner/test-output-skip-each-hooks.mjs | 1 - test/test-runner/test-output-skip-pattern.mjs | 1 - test/test-runner/test-output-source-mapped-locations.mjs | 1 - test/test-runner/test-output-spec-reporter-cli.mjs | 1 - test/test-runner/test-output-spec-reporter-successful.mjs | 1 - test/test-runner/test-output-spec-reporter.mjs | 1 - test/test-runner/test-output-suite-skip-hooks.mjs | 1 - test/test-runner/test-output-tap-escape.mjs | 1 - ...est-output-test-diagnostic-warning-without-test-only-flag.mjs | 1 - test/test-runner/test-output-test-runner-plan-timeout.mjs | 1 - test/test-runner/test-output-test-runner-plan.mjs | 1 - test/test-runner/test-output-test-runner-watch-spec.mjs | 1 - test/test-runner/test-output-test-timeout-flag-with-test.mjs | 1 - test/test-runner/test-output-test-timeout-flag.mjs | 1 - test/test-runner/test-output-timeout-in-before-each.mjs | 1 - test/test-runner/test-output-typescript-coverage.mjs | 1 - test/test-runner/test-output-unfinished-suite-async-error.mjs | 1 - 66 files changed, 66 deletions(-) diff --git a/test/test-runner/test-output-abort-hooks.mjs b/test/test-runner/test-output-abort-hooks.mjs index 505658d947c9..2bb1898c5cc7 100644 --- a/test/test-runner/test-output-abort-hooks.mjs +++ b/test/test-runner/test-output-abort-hooks.mjs @@ -1,4 +1,3 @@ -// Flags: --expose-internals // Test that the output of test-runner/output/abort_hooks.js matches test-runner/output/abort_hooks.snapshot import '../common/index.mjs'; import * as fixtures from '../common/fixtures.mjs'; diff --git a/test/test-runner/test-output-abort-runs-after-hook.mjs b/test/test-runner/test-output-abort-runs-after-hook.mjs index e602200dcf31..e8716bb08333 100644 --- a/test/test-runner/test-output-abort-runs-after-hook.mjs +++ b/test/test-runner/test-output-abort-runs-after-hook.mjs @@ -1,4 +1,3 @@ -// Flags: --expose-internals // Test that the output of test-runner/output/abort-runs-after-hook.js matches // test-runner/output/abort-runs-after-hook.snapshot import '../common/index.mjs'; diff --git a/test/test-runner/test-output-abort-suite.mjs b/test/test-runner/test-output-abort-suite.mjs index 51ebc7d217d2..c3f1b4625b4f 100644 --- a/test/test-runner/test-output-abort-suite.mjs +++ b/test/test-runner/test-output-abort-suite.mjs @@ -1,4 +1,3 @@ -// Flags: --expose-internals // Test that the output of test-runner/output/abort_suite.js matches test-runner/output/abort_suite.snapshot import '../common/index.mjs'; import * as fixtures from '../common/fixtures.mjs'; diff --git a/test/test-runner/test-output-abort.mjs b/test/test-runner/test-output-abort.mjs index 97010ed9457b..b361bc680358 100644 --- a/test/test-runner/test-output-abort.mjs +++ b/test/test-runner/test-output-abort.mjs @@ -1,4 +1,3 @@ -// Flags: --expose-internals // Test that the output of test-runner/output/abort.js matches test-runner/output/abort.snapshot import '../common/index.mjs'; import * as fixtures from '../common/fixtures.mjs'; diff --git a/test/test-runner/test-output-arbitrary-output-colored.mjs b/test/test-runner/test-output-arbitrary-output-colored.mjs index 7d18ac507ccb..77a13d889043 100644 --- a/test/test-runner/test-output-arbitrary-output-colored.mjs +++ b/test/test-runner/test-output-arbitrary-output-colored.mjs @@ -1,4 +1,3 @@ -// Flags: --expose-internals // Test that the output of test-runner/output/arbitrary-output-colored.js matches // test-runner/output/arbitrary-output-colored.snapshot import * as common from '../common/index.mjs'; diff --git a/test/test-runner/test-output-arbitrary-output.mjs b/test/test-runner/test-output-arbitrary-output.mjs index a5ceda5eade9..d7626bb01856 100644 --- a/test/test-runner/test-output-arbitrary-output.mjs +++ b/test/test-runner/test-output-arbitrary-output.mjs @@ -1,4 +1,3 @@ -// Flags: --expose-internals // Test that the output of test-runner/output/arbitrary-output.js matches // test-runner/output/arbitrary-output.snapshot import '../common/index.mjs'; diff --git a/test/test-runner/test-output-async-test-scheduling.mjs b/test/test-runner/test-output-async-test-scheduling.mjs index 999953b865df..5903619f7e12 100644 --- a/test/test-runner/test-output-async-test-scheduling.mjs +++ b/test/test-runner/test-output-async-test-scheduling.mjs @@ -1,4 +1,3 @@ -// Flags: --expose-internals // Test that the output of test-runner/output/async-test-scheduling.mjs matches // test-runner/output/async-test-scheduling.snapshot import '../common/index.mjs'; diff --git a/test/test-runner/test-output-before-and-after-each-too-many-listeners.mjs b/test/test-runner/test-output-before-and-after-each-too-many-listeners.mjs index 3270d3aff2ec..bcaec70b1727 100644 --- a/test/test-runner/test-output-before-and-after-each-too-many-listeners.mjs +++ b/test/test-runner/test-output-before-and-after-each-too-many-listeners.mjs @@ -1,4 +1,3 @@ -// Flags: --expose-internals // Test that the output of test-runner/output/before-and-after-each-too-many-listeners.js matches // test-runner/output/before-and-after-each-too-many-listeners.snapshot import '../common/index.mjs'; diff --git a/test/test-runner/test-output-before-and-after-each-with-timeout-too-many-listeners.mjs b/test/test-runner/test-output-before-and-after-each-with-timeout-too-many-listeners.mjs index ed6615c45746..7804692911ae 100644 --- a/test/test-runner/test-output-before-and-after-each-with-timeout-too-many-listeners.mjs +++ b/test/test-runner/test-output-before-and-after-each-with-timeout-too-many-listeners.mjs @@ -1,4 +1,3 @@ -// Flags: --expose-internals // Test that the output of test-runner/output/before-and-after-each-with-timeout-too-many-listeners.js matches // test-runner/output/before-and-after-each-with-timeout-too-many-listeners.snapshot import '../common/index.mjs'; diff --git a/test/test-runner/test-output-coverage-failure.mjs b/test/test-runner/test-output-coverage-failure.mjs index 589b3134bc42..fc171db3ef46 100644 --- a/test/test-runner/test-output-coverage-failure.mjs +++ b/test/test-runner/test-output-coverage-failure.mjs @@ -1,4 +1,3 @@ -// Flags: --expose-internals // Test that the output of test-runner/output/coverage_failure.js matches // test-runner/output/coverage_failure.snapshot import * as common from '../common/index.mjs'; diff --git a/test/test-runner/test-output-coverage-short-filename.mjs b/test/test-runner/test-output-coverage-short-filename.mjs index 1ee1c2323337..04d673f53068 100644 --- a/test/test-runner/test-output-coverage-short-filename.mjs +++ b/test/test-runner/test-output-coverage-short-filename.mjs @@ -1,4 +1,3 @@ -// Flags: --expose-internals // Test that the output of test-runner/output/coverage-short-filename.mjs matches // test-runner/output/coverage-short-filename.snapshot import * as common from '../common/index.mjs'; diff --git a/test/test-runner/test-output-coverage-width-100-uncovered-lines.mjs b/test/test-runner/test-output-coverage-width-100-uncovered-lines.mjs index 6d56534a8fb1..dd7e1a9c455f 100644 --- a/test/test-runner/test-output-coverage-width-100-uncovered-lines.mjs +++ b/test/test-runner/test-output-coverage-width-100-uncovered-lines.mjs @@ -1,4 +1,3 @@ -// Flags: --expose-internals // Test that the output of test-runner/output/coverage-width-100-uncovered-lines.mjs matches // test-runner/output/coverage-width-100-uncovered-lines.snapshot import * as common from '../common/index.mjs'; diff --git a/test/test-runner/test-output-coverage-width-100.mjs b/test/test-runner/test-output-coverage-width-100.mjs index 79eb7c2b67b8..515e1d4e02ca 100644 --- a/test/test-runner/test-output-coverage-width-100.mjs +++ b/test/test-runner/test-output-coverage-width-100.mjs @@ -1,4 +1,3 @@ -// Flags: --expose-internals // Test that the output of test-runner/output/coverage-width-100.mjs matches // test-runner/output/coverage-width-100.snapshot import * as common from '../common/index.mjs'; diff --git a/test/test-runner/test-output-coverage-width-150-uncovered-lines.mjs b/test/test-runner/test-output-coverage-width-150-uncovered-lines.mjs index e5eeee7d4407..a09aa303c8cc 100644 --- a/test/test-runner/test-output-coverage-width-150-uncovered-lines.mjs +++ b/test/test-runner/test-output-coverage-width-150-uncovered-lines.mjs @@ -1,4 +1,3 @@ -// Flags: --expose-internals // Test that the output of test-runner/output/coverage-width-150-uncovered-lines.mjs matches // test-runner/output/coverage-width-150-uncovered-lines.snapshot import * as common from '../common/index.mjs'; diff --git a/test/test-runner/test-output-coverage-width-150.mjs b/test/test-runner/test-output-coverage-width-150.mjs index c0455ad3d66f..077483de649f 100644 --- a/test/test-runner/test-output-coverage-width-150.mjs +++ b/test/test-runner/test-output-coverage-width-150.mjs @@ -1,4 +1,3 @@ -// Flags: --expose-internals // Test that the output of test-runner/output/coverage-width-150.mjs matches // test-runner/output/coverage-width-150.snapshot import * as common from '../common/index.mjs'; diff --git a/test/test-runner/test-output-coverage-width-40.mjs b/test/test-runner/test-output-coverage-width-40.mjs index 179fae4f775f..2fa862ac48e6 100644 --- a/test/test-runner/test-output-coverage-width-40.mjs +++ b/test/test-runner/test-output-coverage-width-40.mjs @@ -1,4 +1,3 @@ -// Flags: --expose-internals // Test that the output of test-runner/output/coverage-width-40.mjs matches // test-runner/output/coverage-width-40.snapshot import * as common from '../common/index.mjs'; diff --git a/test/test-runner/test-output-coverage-width-80-uncovered-lines.mjs b/test/test-runner/test-output-coverage-width-80-uncovered-lines.mjs index 293a1bbc1060..39cc7d9403c9 100644 --- a/test/test-runner/test-output-coverage-width-80-uncovered-lines.mjs +++ b/test/test-runner/test-output-coverage-width-80-uncovered-lines.mjs @@ -1,4 +1,3 @@ -// Flags: --expose-internals // Test that the output of test-runner/output/coverage-width-80-uncovered-lines.mjs matches // test-runner/output/coverage-width-80-uncovered-lines.snapshot import * as common from '../common/index.mjs'; diff --git a/test/test-runner/test-output-coverage-width-80.mjs b/test/test-runner/test-output-coverage-width-80.mjs index 2a5e8f3ad92f..dabf7644726b 100644 --- a/test/test-runner/test-output-coverage-width-80.mjs +++ b/test/test-runner/test-output-coverage-width-80.mjs @@ -1,4 +1,3 @@ -// Flags: --expose-internals // Test that the output of test-runner/output/coverage-width-80.mjs matches // test-runner/output/coverage-width-80.snapshot import * as common from '../common/index.mjs'; diff --git a/test/test-runner/test-output-coverage-width-infinity-uncovered-lines.mjs b/test/test-runner/test-output-coverage-width-infinity-uncovered-lines.mjs index 76ccc222c2df..b75bec1e04ec 100644 --- a/test/test-runner/test-output-coverage-width-infinity-uncovered-lines.mjs +++ b/test/test-runner/test-output-coverage-width-infinity-uncovered-lines.mjs @@ -1,4 +1,3 @@ -// Flags: --expose-internals // Test that the output of test-runner/output/coverage-width-infinity-uncovered-lines.mjs matches // test-runner/output/coverage-width-infinity-uncovered-lines.snapshot import * as common from '../common/index.mjs'; diff --git a/test/test-runner/test-output-coverage-width-infinity.mjs b/test/test-runner/test-output-coverage-width-infinity.mjs index d2b8ea700e37..f586ff9ab159 100644 --- a/test/test-runner/test-output-coverage-width-infinity.mjs +++ b/test/test-runner/test-output-coverage-width-infinity.mjs @@ -1,4 +1,3 @@ -// Flags: --expose-internals // Test that the output of test-runner/output/coverage-width-infinity.mjs matches // test-runner/output/coverage-width-infinity.snapshot import * as common from '../common/index.mjs'; diff --git a/test/test-runner/test-output-coverage-with-mock.mjs b/test/test-runner/test-output-coverage-with-mock.mjs index d75cccb06a4a..f489451e184d 100644 --- a/test/test-runner/test-output-coverage-with-mock.mjs +++ b/test/test-runner/test-output-coverage-with-mock.mjs @@ -1,4 +1,3 @@ -// Flags: --expose-internals // Test that the output of test-runner/output/coverage-with-mock.mjs matches // test-runner/output/coverage-with-mock.snapshot import * as common from '../common/index.mjs'; diff --git a/test/test-runner/test-output-default-output.mjs b/test/test-runner/test-output-default-output.mjs index 065dbd65902b..96ae13990275 100644 --- a/test/test-runner/test-output-default-output.mjs +++ b/test/test-runner/test-output-default-output.mjs @@ -1,4 +1,3 @@ -// Flags: --expose-internals // Test that the output of test-runner/output/default_output.js matches test-runner/output/default_output.snapshot import '../common/index.mjs'; import * as fixtures from '../common/fixtures.mjs'; diff --git a/test/test-runner/test-output-describe-it.mjs b/test/test-runner/test-output-describe-it.mjs index 0fdda4711593..219951d5aec7 100644 --- a/test/test-runner/test-output-describe-it.mjs +++ b/test/test-runner/test-output-describe-it.mjs @@ -1,4 +1,3 @@ -// Flags: --expose-internals // Test that the output of test-runner/output/describe_it.js matches test-runner/output/describe_it.snapshot import '../common/index.mjs'; import * as fixtures from '../common/fixtures.mjs'; diff --git a/test/test-runner/test-output-describe-nested.mjs b/test/test-runner/test-output-describe-nested.mjs index 56489182978c..661048527fa6 100644 --- a/test/test-runner/test-output-describe-nested.mjs +++ b/test/test-runner/test-output-describe-nested.mjs @@ -1,4 +1,3 @@ -// Flags: --expose-internals // Test that the output of test-runner/output/describe_nested.js matches test-runner/output/describe_nested.snapshot import '../common/index.mjs'; import * as fixtures from '../common/fixtures.mjs'; diff --git a/test/test-runner/test-output-dot-output-custom-columns.mjs b/test/test-runner/test-output-dot-output-custom-columns.mjs index 7a3bdf40d879..c8061e6ba27e 100644 --- a/test/test-runner/test-output-dot-output-custom-columns.mjs +++ b/test/test-runner/test-output-dot-output-custom-columns.mjs @@ -1,4 +1,3 @@ -// Flags: --expose-internals // Test that the output of test-runner/output/dot_output_custom_columns.js matches // test-runner/output/dot_output_custom_columns.snapshot import '../common/index.mjs'; diff --git a/test/test-runner/test-output-dot-reporter.mjs b/test/test-runner/test-output-dot-reporter.mjs index b27b4d7a3488..46312203bb46 100644 --- a/test/test-runner/test-output-dot-reporter.mjs +++ b/test/test-runner/test-output-dot-reporter.mjs @@ -1,4 +1,3 @@ -// Flags: --expose-internals // Test that the output of test-runner/output/dot_reporter.js matches test-runner/output/dot_reporter.snapshot import '../common/index.mjs'; import * as fixtures from '../common/fixtures.mjs'; diff --git a/test/test-runner/test-output-eval-dot.mjs b/test/test-runner/test-output-eval-dot.mjs index 9734b1940c80..e31334ac52dd 100644 --- a/test/test-runner/test-output-eval-dot.mjs +++ b/test/test-runner/test-output-eval-dot.mjs @@ -1,4 +1,3 @@ -// Flags: --expose-internals // Test that the output of test-runner/output/eval_dot.js matches test-runner/output/eval_dot.snapshot import '../common/index.mjs'; import * as fixtures from '../common/fixtures.mjs'; diff --git a/test/test-runner/test-output-eval-spec.mjs b/test/test-runner/test-output-eval-spec.mjs index 623fa10b6b9a..86d6677552bd 100644 --- a/test/test-runner/test-output-eval-spec.mjs +++ b/test/test-runner/test-output-eval-spec.mjs @@ -1,4 +1,3 @@ -// Flags: --expose-internals // Test that the output of test-runner/output/eval_spec.js matches test-runner/output/eval_spec.snapshot import '../common/index.mjs'; import * as fixtures from '../common/fixtures.mjs'; diff --git a/test/test-runner/test-output-eval-tap.mjs b/test/test-runner/test-output-eval-tap.mjs index e32f262b361c..a1902ec92878 100644 --- a/test/test-runner/test-output-eval-tap.mjs +++ b/test/test-runner/test-output-eval-tap.mjs @@ -1,4 +1,3 @@ -// Flags: --expose-internals // Test that the output of test-runner/output/eval_tap.js matches test-runner/output/eval_tap.snapshot import '../common/index.mjs'; import * as fixtures from '../common/fixtures.mjs'; diff --git a/test/test-runner/test-output-filtered-suite-delayed-build.mjs b/test/test-runner/test-output-filtered-suite-delayed-build.mjs index f13b9cc7eecf..c4ec3f3b0197 100644 --- a/test/test-runner/test-output-filtered-suite-delayed-build.mjs +++ b/test/test-runner/test-output-filtered-suite-delayed-build.mjs @@ -1,4 +1,3 @@ -// Flags: --expose-internals // Test that the output of test-runner/output/filtered-suite-delayed-build.js matches // test-runner/output/filtered-suite-delayed-build.snapshot import '../common/index.mjs'; diff --git a/test/test-runner/test-output-filtered-suite-order.mjs b/test/test-runner/test-output-filtered-suite-order.mjs index 0ccffe365fea..f29c4dcf62bc 100644 --- a/test/test-runner/test-output-filtered-suite-order.mjs +++ b/test/test-runner/test-output-filtered-suite-order.mjs @@ -1,4 +1,3 @@ -// Flags: --expose-internals // Test that the output of test-runner/output/filtered-suite-order.mjs matches // test-runner/output/filtered-suite-order.snapshot import '../common/index.mjs'; diff --git a/test/test-runner/test-output-filtered-suite-throws.mjs b/test/test-runner/test-output-filtered-suite-throws.mjs index 729fdee1265b..7976e3b63753 100644 --- a/test/test-runner/test-output-filtered-suite-throws.mjs +++ b/test/test-runner/test-output-filtered-suite-throws.mjs @@ -1,4 +1,3 @@ -// Flags: --expose-internals // Test that the output of test-runner/output/filtered-suite-throws.js matches // test-runner/output/filtered-suite-throws.snapshot import '../common/index.mjs'; diff --git a/test/test-runner/test-output-force-exit.mjs b/test/test-runner/test-output-force-exit.mjs index 8321dc55f2a7..5138e3df57da 100644 --- a/test/test-runner/test-output-force-exit.mjs +++ b/test/test-runner/test-output-force-exit.mjs @@ -1,4 +1,3 @@ -// Flags: --expose-internals // Test that the output of test-runner/output/force_exit.js matches test-runner/output/force_exit.snapshot import '../common/index.mjs'; import * as fixtures from '../common/fixtures.mjs'; diff --git a/test/test-runner/test-output-global-after-should-fail-the-test.mjs b/test/test-runner/test-output-global-after-should-fail-the-test.mjs index f2b86d20e8d5..71179d7f15eb 100644 --- a/test/test-runner/test-output-global-after-should-fail-the-test.mjs +++ b/test/test-runner/test-output-global-after-should-fail-the-test.mjs @@ -1,4 +1,3 @@ -// Flags: --expose-internals // Test that the output of test-runner/output/global_after_should_fail_the_test.js matches // test-runner/output/global_after_should_fail_the_test.snapshot import '../common/index.mjs'; diff --git a/test/test-runner/test-output-global-hooks-with-no-tests.mjs b/test/test-runner/test-output-global-hooks-with-no-tests.mjs index 280a755ad723..361948df103b 100644 --- a/test/test-runner/test-output-global-hooks-with-no-tests.mjs +++ b/test/test-runner/test-output-global-hooks-with-no-tests.mjs @@ -1,4 +1,3 @@ -// Flags: --expose-internals // Test that the output of test-runner/output/global-hooks-with-no-tests.js matches // test-runner/output/global-hooks-with-no-tests.snapshot import '../common/index.mjs'; diff --git a/test/test-runner/test-output-hooks-spec-reporter.mjs b/test/test-runner/test-output-hooks-spec-reporter.mjs index 87e115aa0f03..cc46592fb74c 100644 --- a/test/test-runner/test-output-hooks-spec-reporter.mjs +++ b/test/test-runner/test-output-hooks-spec-reporter.mjs @@ -1,4 +1,3 @@ -// Flags: --expose-internals // Test that the output of test-runner/output/hooks_spec_reporter.js matches // test-runner/output/hooks_spec_reporter.snapshot import '../common/index.mjs'; diff --git a/test/test-runner/test-output-hooks-with-no-global-test.mjs b/test/test-runner/test-output-hooks-with-no-global-test.mjs index f21cee7fae2c..a0c0327e0f9e 100644 --- a/test/test-runner/test-output-hooks-with-no-global-test.mjs +++ b/test/test-runner/test-output-hooks-with-no-global-test.mjs @@ -1,4 +1,3 @@ -// Flags: --expose-internals // Test that the output of test-runner/output/hooks-with-no-global-test.js matches // test-runner/output/hooks-with-no-global-test.snapshot import '../common/index.mjs'; diff --git a/test/test-runner/test-output-hooks.mjs b/test/test-runner/test-output-hooks.mjs index 5b60aac79987..b1e1d655df6d 100644 --- a/test/test-runner/test-output-hooks.mjs +++ b/test/test-runner/test-output-hooks.mjs @@ -1,4 +1,3 @@ -// Flags: --expose-internals // Test that the output of test-runner/output/hooks.js matches test-runner/output/hooks.snapshot import '../common/index.mjs'; import * as fixtures from '../common/fixtures.mjs'; diff --git a/test/test-runner/test-output-junit-reporter.mjs b/test/test-runner/test-output-junit-reporter.mjs index 5a9b453ffe78..ece14e09ac2e 100644 --- a/test/test-runner/test-output-junit-reporter.mjs +++ b/test/test-runner/test-output-junit-reporter.mjs @@ -1,4 +1,3 @@ -// Flags: --expose-internals // Test that the output of test-runner/output/junit_reporter.js matches // test-runner/output/junit_reporter.snapshot import '../common/index.mjs'; diff --git a/test/test-runner/test-output-lcov-reporter.mjs b/test/test-runner/test-output-lcov-reporter.mjs index 08c1188d00e7..93aa38fff2bc 100644 --- a/test/test-runner/test-output-lcov-reporter.mjs +++ b/test/test-runner/test-output-lcov-reporter.mjs @@ -1,4 +1,3 @@ -// Flags: --expose-internals // Test that the output of test-runner/output/lcov_reporter.js matches test-runner/output/lcov_reporter.snapshot import * as common from '../common/index.mjs'; import * as fixtures from '../common/fixtures.mjs'; diff --git a/test/test-runner/test-output-name-and-skip-patterns.mjs b/test/test-runner/test-output-name-and-skip-patterns.mjs index 403918e3882b..875641a28435 100644 --- a/test/test-runner/test-output-name-and-skip-patterns.mjs +++ b/test/test-runner/test-output-name-and-skip-patterns.mjs @@ -1,4 +1,3 @@ -// Flags: --expose-internals // Test that the output of test-runner/output/name_and_skip_patterns.js matches // test-runner/output/name_and_skip_patterns.snapshot import '../common/index.mjs'; diff --git a/test/test-runner/test-output-name-pattern-with-only.mjs b/test/test-runner/test-output-name-pattern-with-only.mjs index f9571e6dce80..89b94f8a80a0 100644 --- a/test/test-runner/test-output-name-pattern-with-only.mjs +++ b/test/test-runner/test-output-name-pattern-with-only.mjs @@ -1,4 +1,3 @@ -// Flags: --expose-internals // Test that the output of test-runner/output/name_pattern_with_only.js matches // test-runner/output/name_pattern_with_only.snapshot import '../common/index.mjs'; diff --git a/test/test-runner/test-output-name-pattern.mjs b/test/test-runner/test-output-name-pattern.mjs index 70dc063d51ba..efaef28ed0f0 100644 --- a/test/test-runner/test-output-name-pattern.mjs +++ b/test/test-runner/test-output-name-pattern.mjs @@ -1,4 +1,3 @@ -// Flags: --expose-internals // Test that the output of test-runner/output/name_pattern.js matches test-runner/output/name_pattern.snapshot import '../common/index.mjs'; import * as fixtures from '../common/fixtures.mjs'; diff --git a/test/test-runner/test-output-no-refs.mjs b/test/test-runner/test-output-no-refs.mjs index 0ac276dc74a1..5e2fbab53b2f 100644 --- a/test/test-runner/test-output-no-refs.mjs +++ b/test/test-runner/test-output-no-refs.mjs @@ -1,4 +1,3 @@ -// Flags: --expose-internals // Test that the output of test-runner/output/no_refs.js matches test-runner/output/no_refs.snapshot import '../common/index.mjs'; import * as fixtures from '../common/fixtures.mjs'; diff --git a/test/test-runner/test-output-no-tests.mjs b/test/test-runner/test-output-no-tests.mjs index 846314ce470c..0cff4003e759 100644 --- a/test/test-runner/test-output-no-tests.mjs +++ b/test/test-runner/test-output-no-tests.mjs @@ -1,4 +1,3 @@ -// Flags: --expose-internals // Test that the output of test-runner/output/no_tests.js matches test-runner/output/no_tests.snapshot import '../common/index.mjs'; import * as fixtures from '../common/fixtures.mjs'; diff --git a/test/test-runner/test-output-non-tty-forced-color-output.mjs b/test/test-runner/test-output-non-tty-forced-color-output.mjs index be8cd8e8d2fa..d630c52e293a 100644 --- a/test/test-runner/test-output-non-tty-forced-color-output.mjs +++ b/test/test-runner/test-output-non-tty-forced-color-output.mjs @@ -1,4 +1,3 @@ -// Flags: --expose-internals // Test that the output of test-runner/output/non-tty-forced-color-output.js matches // test-runner/output/non-tty-forced-color-output.snapshot import '../common/index.mjs'; diff --git a/test/test-runner/test-output-only-tests.mjs b/test/test-runner/test-output-only-tests.mjs index 5aedb23853b5..93a9097bec15 100644 --- a/test/test-runner/test-output-only-tests.mjs +++ b/test/test-runner/test-output-only-tests.mjs @@ -1,4 +1,3 @@ -// Flags: --expose-internals // Test that the output of test-runner/output/only_tests.js matches test-runner/output/only_tests.snapshot import '../common/index.mjs'; import * as fixtures from '../common/fixtures.mjs'; diff --git a/test/test-runner/test-output-output-cli.mjs b/test/test-runner/test-output-output-cli.mjs index db243a2972de..924b6212e2ea 100644 --- a/test/test-runner/test-output-output-cli.mjs +++ b/test/test-runner/test-output-output-cli.mjs @@ -1,4 +1,3 @@ -// Flags: --expose-internals // Test that the output of test-runner/output/output_cli.js matches test-runner/output/output_cli.snapshot import '../common/index.mjs'; import * as fixtures from '../common/fixtures.mjs'; diff --git a/test/test-runner/test-output-output.mjs b/test/test-runner/test-output-output.mjs index 8db6bbe6f423..1eb152324c40 100644 --- a/test/test-runner/test-output-output.mjs +++ b/test/test-runner/test-output-output.mjs @@ -1,4 +1,3 @@ -// Flags: --expose-internals // Test that the output of test-runner/output/output.js matches test-runner/output/output.snapshot import '../common/index.mjs'; import * as fixtures from '../common/fixtures.mjs'; diff --git a/test/test-runner/test-output-skip-each-hooks.mjs b/test/test-runner/test-output-skip-each-hooks.mjs index 7227a0b129ae..a5fb2fb61362 100644 --- a/test/test-runner/test-output-skip-each-hooks.mjs +++ b/test/test-runner/test-output-skip-each-hooks.mjs @@ -1,4 +1,3 @@ -// Flags: --expose-internals // Test that the output of test-runner/output/skip-each-hooks.js matches // test-runner/output/skip-each-hooks.snapshot import '../common/index.mjs'; diff --git a/test/test-runner/test-output-skip-pattern.mjs b/test/test-runner/test-output-skip-pattern.mjs index 0a601f969087..852b48e7a2b6 100644 --- a/test/test-runner/test-output-skip-pattern.mjs +++ b/test/test-runner/test-output-skip-pattern.mjs @@ -1,4 +1,3 @@ -// Flags: --expose-internals // Test that the output of test-runner/output/skip_pattern.js matches test-runner/output/skip_pattern.snapshot import '../common/index.mjs'; import * as fixtures from '../common/fixtures.mjs'; diff --git a/test/test-runner/test-output-source-mapped-locations.mjs b/test/test-runner/test-output-source-mapped-locations.mjs index d0a8bdc66ccf..a24bed052dc3 100644 --- a/test/test-runner/test-output-source-mapped-locations.mjs +++ b/test/test-runner/test-output-source-mapped-locations.mjs @@ -1,4 +1,3 @@ -// Flags: --expose-internals // Test that the output of test-runner/output/source_mapped_locations.mjs matches // test-runner/output/source_mapped_locations.snapshot import '../common/index.mjs'; diff --git a/test/test-runner/test-output-spec-reporter-cli.mjs b/test/test-runner/test-output-spec-reporter-cli.mjs index acf00c55c158..5b44483601c3 100644 --- a/test/test-runner/test-output-spec-reporter-cli.mjs +++ b/test/test-runner/test-output-spec-reporter-cli.mjs @@ -1,4 +1,3 @@ -// Flags: --expose-internals // Test that the output of test-runner/output/spec_reporter_cli.js matches // test-runner/output/spec_reporter_cli.snapshot import '../common/index.mjs'; diff --git a/test/test-runner/test-output-spec-reporter-successful.mjs b/test/test-runner/test-output-spec-reporter-successful.mjs index 4c15a8d6dc67..0308d1e1f01b 100644 --- a/test/test-runner/test-output-spec-reporter-successful.mjs +++ b/test/test-runner/test-output-spec-reporter-successful.mjs @@ -1,4 +1,3 @@ -// Flags: --expose-internals // Test that the output of test-runner/output/spec_reporter_successful.js matches // test-runner/output/spec_reporter_successful.snapshot import '../common/index.mjs'; diff --git a/test/test-runner/test-output-spec-reporter.mjs b/test/test-runner/test-output-spec-reporter.mjs index efc9cae34bc0..e7233b13da95 100644 --- a/test/test-runner/test-output-spec-reporter.mjs +++ b/test/test-runner/test-output-spec-reporter.mjs @@ -1,4 +1,3 @@ -// Flags: --expose-internals // Test that the output of test-runner/output/spec_reporter.js matches test-runner/output/spec_reporter.snapshot import '../common/index.mjs'; import * as fixtures from '../common/fixtures.mjs'; diff --git a/test/test-runner/test-output-suite-skip-hooks.mjs b/test/test-runner/test-output-suite-skip-hooks.mjs index 33d67bc41bef..183c4bb27c5d 100644 --- a/test/test-runner/test-output-suite-skip-hooks.mjs +++ b/test/test-runner/test-output-suite-skip-hooks.mjs @@ -1,4 +1,3 @@ -// Flags: --expose-internals // Test that the output of test-runner/output/suite-skip-hooks.js matches // test-runner/output/suite-skip-hooks.snapshot import '../common/index.mjs'; diff --git a/test/test-runner/test-output-tap-escape.mjs b/test/test-runner/test-output-tap-escape.mjs index bbbc23fbdd53..f0b4471d5158 100644 --- a/test/test-runner/test-output-tap-escape.mjs +++ b/test/test-runner/test-output-tap-escape.mjs @@ -1,4 +1,3 @@ -// Flags: --expose-internals // Test that the output of test-runner/output/tap_escape.js matches test-runner/output/tap_escape.snapshot import '../common/index.mjs'; import * as fixtures from '../common/fixtures.mjs'; diff --git a/test/test-runner/test-output-test-diagnostic-warning-without-test-only-flag.mjs b/test/test-runner/test-output-test-diagnostic-warning-without-test-only-flag.mjs index 4a7b781900cb..b5f59df53b86 100644 --- a/test/test-runner/test-output-test-diagnostic-warning-without-test-only-flag.mjs +++ b/test/test-runner/test-output-test-diagnostic-warning-without-test-only-flag.mjs @@ -1,4 +1,3 @@ -// Flags: --expose-internals // Test that the output of test-runner/output/test-diagnostic-warning-without-test-only-flag.js matches // test-runner/output/test-diagnostic-warning-without-test-only-flag.snapshot import '../common/index.mjs'; diff --git a/test/test-runner/test-output-test-runner-plan-timeout.mjs b/test/test-runner/test-output-test-runner-plan-timeout.mjs index f947f16617ab..6771468d3b9f 100644 --- a/test/test-runner/test-output-test-runner-plan-timeout.mjs +++ b/test/test-runner/test-output-test-runner-plan-timeout.mjs @@ -1,4 +1,3 @@ -// Flags: --expose-internals // Test that the output of test-runner/output/test-runner-plan-timeout.js matches // test-runner/output/test-runner-plan-timeout.snapshot import '../common/index.mjs'; diff --git a/test/test-runner/test-output-test-runner-plan.mjs b/test/test-runner/test-output-test-runner-plan.mjs index e06b44ff9768..a4533e9a1b11 100644 --- a/test/test-runner/test-output-test-runner-plan.mjs +++ b/test/test-runner/test-output-test-runner-plan.mjs @@ -1,4 +1,3 @@ -// Flags: --expose-internals // Test that the output of test-runner/output/test-runner-plan.js matches // test-runner/output/test-runner-plan.snapshot import '../common/index.mjs'; diff --git a/test/test-runner/test-output-test-runner-watch-spec.mjs b/test/test-runner/test-output-test-runner-watch-spec.mjs index 2a2f9527e47e..c835b11527a8 100644 --- a/test/test-runner/test-output-test-runner-watch-spec.mjs +++ b/test/test-runner/test-output-test-runner-watch-spec.mjs @@ -1,4 +1,3 @@ -// Flags: --expose-internals // Test that the output of test-runner/output/test-runner-watch-spec.mjs matches // test-runner/output/test-runner-watch-spec.snapshot import '../common/index.mjs'; diff --git a/test/test-runner/test-output-test-timeout-flag-with-test.mjs b/test/test-runner/test-output-test-timeout-flag-with-test.mjs index 493c057e0bdb..f34db67d0be2 100644 --- a/test/test-runner/test-output-test-timeout-flag-with-test.mjs +++ b/test/test-runner/test-output-test-timeout-flag-with-test.mjs @@ -1,4 +1,3 @@ -// Flags: --expose-internals // Test that the output of test-runner/output/test-timeout-flag.js matches // test-runner/output/test-timeout-flag.snapshot with --test flag. // --test-timeout should work with or without --test flag. diff --git a/test/test-runner/test-output-test-timeout-flag.mjs b/test/test-runner/test-output-test-timeout-flag.mjs index 93938cb44045..96ef6c47af00 100644 --- a/test/test-runner/test-output-test-timeout-flag.mjs +++ b/test/test-runner/test-output-test-timeout-flag.mjs @@ -1,4 +1,3 @@ -// Flags: --expose-internals // Test that the output of test-runner/output/test-timeout-flag.js matches // test-runner/output/test-timeout-flag.snapshot import '../common/index.mjs'; diff --git a/test/test-runner/test-output-timeout-in-before-each.mjs b/test/test-runner/test-output-timeout-in-before-each.mjs index 916499f9d7e2..e0efd67155f5 100644 --- a/test/test-runner/test-output-timeout-in-before-each.mjs +++ b/test/test-runner/test-output-timeout-in-before-each.mjs @@ -1,4 +1,3 @@ -// Flags: --expose-internals // Test that the output of test-runner/output/timeout_in_before_each_should_not_affect_further_tests.js matches // test-runner/output/timeout_in_before_each_should_not_affect_further_tests.snapshot import '../common/index.mjs'; diff --git a/test/test-runner/test-output-typescript-coverage.mjs b/test/test-runner/test-output-typescript-coverage.mjs index e4c252cb73b0..41aa97d194cc 100644 --- a/test/test-runner/test-output-typescript-coverage.mjs +++ b/test/test-runner/test-output-typescript-coverage.mjs @@ -1,4 +1,3 @@ -// Flags: --expose-internals // Test that the output of test-runner/output/typescript-coverage.mts matches // test-runner/output/typescript-coverage.snapshot import * as common from '../common/index.mjs'; diff --git a/test/test-runner/test-output-unfinished-suite-async-error.mjs b/test/test-runner/test-output-unfinished-suite-async-error.mjs index c8b4a1de5650..b6af0ae9a117 100644 --- a/test/test-runner/test-output-unfinished-suite-async-error.mjs +++ b/test/test-runner/test-output-unfinished-suite-async-error.mjs @@ -1,4 +1,3 @@ -// Flags: --expose-internals // Test that the output of test-runner/output/unfinished-suite-async-error.js matches // test-runner/output/unfinished-suite-async-error.snapshot import '../common/index.mjs';