From 43dcaa3428cd388d177ca9b5e27554182b0a6a5d Mon Sep 17 00:00:00 2001 From: Shubham Pandey Date: Wed, 8 Nov 2023 19:32:12 +0530 Subject: [PATCH] test_runner, cli: add --test-timeout flag PR-URL: https://github.com/nodejs/node/pull/50443 Fixes: https://github.com/nodejs/node/issues/50431 Reviewed-By: James M Snell Reviewed-By: Moshe Atlow Reviewed-By: Raz Luvaton Reviewed-By: Chemi Atlow Reviewed-By: Benjamin Gruenbaum --- doc/api/cli.md | 9 +++++++++ doc/node.1 | 3 +++ lib/internal/main/test_runner.js | 3 +++ src/node_options.cc | 3 +++ src/node_options.h | 1 + test/parallel/test-runner-cli-timeout.js | 20 ++++++++++++++++++++ 6 files changed, 39 insertions(+) create mode 100644 test/parallel/test-runner-cli-timeout.js diff --git a/doc/api/cli.md b/doc/api/cli.md index 5f29c497426db6..1bd4864b2d1bca 100644 --- a/doc/api/cli.md +++ b/doc/api/cli.md @@ -1771,6 +1771,15 @@ node --test --test-shard=2/3 node --test --test-shard=3/3 ``` +### `--test-timeout` + + + +A number of milliseconds the test execution will fail after. If unspecified, +subtests inherit this value from their parent. The default value is `Infinity`. + ### `--throw-deprecation`