From 842dc01deff4455a529c0b9b0ce6bef29d33e1fa 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 31c98cd1dcfbc1..3e982d39707c4d 100644 --- a/doc/api/cli.md +++ b/doc/api/cli.md @@ -1743,6 +1743,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`