node/test/test-runner/test-output-test-timeout-flag-with-test.mjs
Joyee Cheung bfcf2f7a15
test: put helper in test-runner-output into common
PR-URL: https://github.com/nodejs/node/pull/60330
Refs: https://github.com/nodejs/node/issues/55390
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com>
2025-10-24 09:12:46 +00:00

14 lines
589 B
JavaScript

// 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'] },
);