mirror of
https://github.com/nodejs/node.git
synced 2025-08-17 06:38:47 +02:00

PR-URL: https://github.com/nodejs/node/pull/50443 Fixes: https://github.com/nodejs/node/issues/50431 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: Raz Luvaton <rluvaton@gmail.com> Reviewed-By: Chemi Atlow <chemi@atlow.co.il> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
20 lines
750 B
JavaScript
20 lines
750 B
JavaScript
'use strict';
|
|
require('../common');
|
|
const fixtures = require('../common/fixtures');
|
|
const assert = require('node:assert');
|
|
const { spawnSync } = require('node:child_process');
|
|
const { test } = require('node:test');
|
|
const cwd = fixtures.path('test-runner', 'default-behavior');
|
|
const env = { ...process.env, 'NODE_DEBUG': 'test_runner' };
|
|
|
|
test('default timeout -- Infinity', async () => {
|
|
const args = ['--test'];
|
|
const cp = spawnSync(process.execPath, args, { cwd, env });
|
|
assert.match(cp.stderr.toString(), /timeout: Infinity,/);
|
|
});
|
|
|
|
test('timeout of 10ms', async () => {
|
|
const args = ['--test', '--test-timeout', 10];
|
|
const cp = spawnSync(process.execPath, args, { cwd, env });
|
|
assert.match(cp.stderr.toString(), /timeout: 10,/);
|
|
});
|