Moshe Atlow
31b9e60979
test_runner: add testId to test events
...
Signed-off-by: Moshe Atlow <moshe@atlow.co.il >
PR-URL: https://github.com/nodejs/node/pull/62772
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2026-04-18 10:10:56 +00:00
Moshe Atlow
c7d05fc0d3
test_runner: publish to TracingChannel for OTel instrumentation
...
Signed-off-by: Moshe Atlow <moshe@atlow.co.il >
PR-URL: https://github.com/nodejs/node/pull/62502
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
2026-04-13 15:01:34 +03:00
Pietro Marchini
5ff1eab951
test_runner: support test order randomization
...
PR-URL: https://github.com/nodejs/node/pull/61747
Reviewed-By: Jacob Smith <jacob@frende.me >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Aviv Keller <me@aviv.sh >
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
2026-04-02 16:55:11 +00:00
Moshe Atlow
cdc577484b
test_runner: add passed, attempt, and diagnostic to SuiteContext
...
PR-URL: https://github.com/nodejs/node/pull/62504
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com >
2026-04-01 11:29:56 +00:00
Moshe Atlow
c5a83ab77c
test_runner: add getTestContext()
...
PR-URL: https://github.com/nodejs/node/pull/62501
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
2026-04-01 10:09:41 +00:00
Matteo Collina
8199f9c9d9
test_runner: make it compatible with fake timers
...
Signed-off-by: Matteo Collina <hello@matteocollina.com >
PR-URL: https://github.com/nodejs/node/pull/59272
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Aviv Keller <me@aviv.sh >
Reviewed-By: Paolo Insogna <paolo@cowtech.it >
2026-03-22 13:07:26 +00:00
Igor Shevelenkov
2ae6d8f2d6
test_runner: run afterEach on runtime skip
...
Signed-off-by: Igor <igorshevelenkov4@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/61525
Fixes: https://github.com/nodejs/node/issues/61462
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com >
Reviewed-By: Jacob Smith <jacob@frende.me >
2026-02-26 21:36:23 +00:00
sangwook
2e1265a444
test_runner: expose expectFailure message
...
This change exposes the expectFailure message in the test runner and
adds edge cases for expectFailure ambiguity.
PR-URL: https://github.com/nodejs/node/pull/61563
Fixes: https://github.com/nodejs/node/issues/61570
Reviewed-By: Jordan Harband <ljharb@gmail.com >
Reviewed-By: Aviv Keller <me@aviv.sh >
Reviewed-By: Jacob Smith <jacob@frende.me >
2026-02-26 15:37:55 +00:00
Ali Hassan
2ebe49600e
test_runner: expose worker ID for concurrent test execution
...
This adds support for identifying which worker is running a test file
when tests execute concurrently, similar to JEST_WORKER_ID in Jest,
VITEST_POOL_ID in Vitest, and MOCHA_WORKER_ID in Mocha.
When running with --test-isolation=process (default), each test file
runs in a separate child process and receives a unique worker ID from
1 to N. When running with --test-isolation=none, all tests run in the
same process and the worker ID is always 1.
This enables users to allocate separate resources (databases, ports,
etc.) for each test worker to avoid conflicts during concurrent
execution.
Changes:
- Add WorkerIdPool class to manage worker ID allocation and reuse
- Set NODE_TEST_WORKER_ID environment variable for child processes
- Add context.workerId getter to TestContext class
- Add tests for worker ID functionality
- Add documentation for context.workerId
Fixes: https://github.com/nodejs/node/issues/55842
PR-URL: https://github.com/nodejs/node/pull/61394
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com >
Reviewed-By: Jacob Smith <jacob@frende.me >
2026-02-24 23:37:22 +00:00
Moshe Atlow
e687680457
test_runner: fix suite rerun
...
PR-URL: https://github.com/nodejs/node/pull/61775
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com >
2026-02-13 14:31:09 +00:00
Moshe Atlow
ea83d326f7
test_runner: fix passing expectFailure
...
PR-URL: https://github.com/nodejs/node/pull/61568
Reviewed-By: Jacob Smith <jacob@frende.me >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com >
Reviewed-By: Jordan Harband <ljharb@gmail.com >
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com >
2026-01-30 17:41:45 +00:00
Moshe Atlow
8365edcbd0
test_runner: fix rerun ambiguous test failures
...
PR-URL: https://github.com/nodejs/node/pull/61392
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
Reviewed-By: Jacob Smith <jacob@frende.me >
Reviewed-By: Zeyu "Alex" Yang <himself65@outlook.com >
2026-01-17 14:02:35 +00:00
Jacob Smith and Alejandro Espa
538aebfa5d
test_runner: support expecting a test-case to fail
...
Co-Authored-By: Alejandro Espa <98526766+vespa7@users.noreply.github.com >
PR-URL: https://github.com/nodejs/node/pull/60669
Reviewed-By: Aviv Keller <me@aviv.sh >
Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Jordan Harband <ljharb@gmail.com >
2026-01-15 22:55:01 +01:00
Antoine du Hamel
5e6ac7ede6
test_runner: simplify code and make it more consistent
...
PR-URL: https://github.com/nodejs/node/pull/60777
Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com >
Reviewed-By: Xuguang Mei <meixuguang@gmail.com >
Reviewed-By: Ilyas Shabi <ilyasshabi94@gmail.com >
2025-11-20 14:16:04 +00:00
Ruben Bridgewater
d3f79aa65d
assert: allow printf-style messages as assertion error
...
Also add functions as allowed message input.
This allows to have leavy message computation to become cheaper.
PR-URL: https://github.com/nodejs/node/pull/58849
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
2025-10-17 20:15:17 +00:00
Moshe Atlow
6dbf7086bb
test_runner: fix suite timeout
...
PR-URL: https://github.com/nodejs/node/pull/59853
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
2025-10-09 04:40:05 +00:00
Moshe Atlow
2258f22672
test_runner: fix todo inheritance
...
PR-URL: https://github.com/nodejs/node/pull/59721
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com >
Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
2025-09-04 09:35:48 +00:00
René
52f616d42f
test_runner: do not error when getting fullName of root context
...
PR-URL: https://github.com/nodejs/node/pull/59377
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
2025-08-23 19:40:58 +00:00
Moshe Atlow
64355ae97e
test_runner: add option to rerun only failed tests
...
PR-URL: https://github.com/nodejs/node/pull/59443
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com >
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
2025-08-19 07:42:00 +00:00
Yagiz Nizipli
0fd1ecded6
meta: enable jsdoc/check-tag-names rule
...
PR-URL: https://github.com/nodejs/node/pull/58521
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: LiviaMedeiros <livia@cirno.name >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2025-07-18 09:28:21 +00:00
cjihrig
dff081e01f
test_runner: automatically wait for subtests to finish
...
This commit updates the test runner to automatically wait for
subtests to finish. This makes the experience more consistent
with suites and removes the need to await anything.
PR-URL: https://github.com/nodejs/node/pull/58800
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com >
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
2025-06-24 11:02:46 -03:00
Romain Menke
bf86e025a5
Revert "test_runner: remove promises returned by t.test()"
...
This reverts commit 1a2eb15bc6 .
PR-URL: https://github.com/nodejs/node/pull/58282
Fixes: https://github.com/nodejs/node/issues/58227
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: LiviaMedeiros <livia@cirno.name >
2025-06-23 09:37:40 +00:00
Romain Menke
7a0c74b4ea
Revert "test_runner: automatically wait for subtests to finish"
...
This reverts commit aa3523ec22 .
PR-URL: https://github.com/nodejs/node/pull/58282
Fixes: https://github.com/nodejs/node/issues/58227
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: LiviaMedeiros <livia@cirno.name >
2025-06-23 09:37:39 +00:00
Jacopo Martinelli
38757c906d
test_runner: add level parameter to reporter.diagnostic
...
Added a parameter to allow severity-based formatting for
diagnostic messages. Defaults to 'info'.
This update enables better control over message presentation
(e.g., coloring) based on severity levels such as 'info', 'warn',
and 'error'.
Refs: https://github.com/nodejs/node/issues/55922
PR-URL: https://github.com/nodejs/node/pull/57923
Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2025-05-19 08:28:05 +00:00
Pietro Marchini
8e4e4df91a
test_runner: recalculate run duration on watch restart
...
PR-URL: https://github.com/nodejs/node/pull/57786
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
2025-04-16 15:38:50 +00:00
jakecastelli
67786c1270
test_runner: improve --test-timeout to be per test
...
Previously `--test-timeout` is set on per test execution, this is
obviously a bug as per test execution is hard to be expected, this patch
addresses the issue by setting `timeout` from per execution to per test.
This patch also fixes a minor issue that `--test-timeout` is not being
respected when running without `--test`.
PR-URL: https://github.com/nodejs/node/pull/57672
Fixes: https://github.com/nodejs/node/issues/57656
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2025-04-09 14:36:19 +00:00
Pietro Marchini
8c2df73db6
test_runner: refactor testPlan counter increse
...
PR-URL: https://github.com/nodejs/node/pull/56765
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
2025-02-23 20:31:14 +00:00
cjihrig
1a2eb15bc6
test_runner: remove promises returned by t.test()
...
This commit updates the TestContext.prototype.test() API to no
longer return a Promise.
Fixes: https://github.com/nodejs/node/issues/51292
PR-URL: https://github.com/nodejs/node/pull/56664
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Jacob Smith <jacob@frende.me >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Raz Luvaton <rluvaton@gmail.com >
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
2025-01-31 12:56:03 -08:00
cjihrig
aa3523ec22
test_runner: automatically wait for subtests to finish
...
This commit updates the test runner to automatically wait for
subtests to finish. This makes the experience more consistent
with suites and removes the need to await anything.
PR-URL: https://github.com/nodejs/node/pull/56664
Fixes: https://github.com/nodejs/node/issues/51292
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Jacob Smith <jacob@frende.me >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Raz Luvaton <rluvaton@gmail.com >
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
2025-01-31 12:55:59 -08:00
Colin Ihrig
0e7ec5e7a1
test_runner: add TestContext.prototype.waitFor()
...
This commit adds a waitFor() method to the TestContext class in
the test runner. As the name implies, this method allows tests to
more easily wait for things to happen.
PR-URL: https://github.com/nodejs/node/pull/56595
Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2025-01-16 02:32:37 +00:00
Colin Ihrig
19c8cc12ce
test_runner: add t.assert.fileSnapshot()
...
This commit adds a t.assert.fileSnapshot() API to the test runner.
This is similar to how snapshot tests work in core, as well as
userland options such as toMatchFileSnapshot().
PR-URL: https://github.com/nodejs/node/pull/56459
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
2025-01-09 21:12:17 +00:00
Eddie Abbondanzio
383e1a281b
test_runner: differentiate test types in enqueue dequeue events
...
PR-URL: https://github.com/nodejs/node/pull/54049
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
2025-01-05 08:35:35 +00:00
Colin Ihrig
4a7b8157b5
test_runner: add assert.register() API
...
This commit adds a top level assert.register() API to the test
runner. This function allows users to define their own custom
assertion functions on the TestContext.
Fixes: https://github.com/nodejs/node/issues/52033
PR-URL: https://github.com/nodejs/node/pull/56434
Reviewed-By: Jacob Smith <jacob@frende.me >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com >
2025-01-04 18:30:04 +00:00
cjihrig
216fd206b6
test_runner: refactor build Promise in Suite()
...
This commit refactors the buildSuite Promise logic in the Suite
constructor to use an async function instead of creating an
awkward primordial-based Promise chain.
PR-URL: https://github.com/nodejs/node/pull/55958
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com >
Reviewed-By: Jacob Smith <jacob@frende.me >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
2024-11-25 07:35:35 +00:00
Colin Ihrig
b09618e474
test_runner: simplify hook running logic
...
This commit removes some asynchronous logic from the runHook()
method and replaces ArrayPrototypeReduce() with a for loop.
PR-URL: https://github.com/nodejs/node/pull/55963
Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2024-11-25 02:30:43 +00:00
Giovanni Bucci and Cristian Barlutiu
d0d52092cf
assert: add partialDeepStrictEqual
...
Fixes: https://github.com/nodejs/node/issues/50399
Co-Authored-By: Cristian Barlutiu <cristian.barlutiu@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/54630
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Jithil P Ponnan <jithil@outlook.com >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
2024-11-23 17:45:49 +00:00
Colin Ihrig
c921676512
test_runner: mark snapshot testing as stable
...
This commit marks the test runner's snapshot testing API as
stable.
PR-URL: https://github.com/nodejs/node/pull/55897
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Jacob Smith <jacob@frende.me >
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
2024-11-19 17:37:35 +00:00
Yagiz Nizipli
bb8cc65edb
lib: replace createDeferredPromise util with Promise.withResolvers
...
PR-URL: https://github.com/nodejs/node/pull/54836
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Robert Nagy <ronagy@icloud.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2024-10-19 10:13:58 +02:00
Aviv Keller
71785889c8
lib: prefer logical assignment
...
PR-URL: https://github.com/nodejs/node/pull/55044
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: LiviaMedeiros <livia@cirno.name >
2024-10-09 06:42:16 +00:00
Michaël Zasso
d5eb9a378e
lib: remove Symbol[Async]Dispose polyfills
...
PR-URL: https://github.com/nodejs/node/pull/55276
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
2024-10-07 09:47:44 +00:00
Edigleysson Silva (Edy)
980b91a1ef
test_runner: assert entry is a valid object
...
PR-URL: https://github.com/nodejs/node/pull/55231
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2024-10-06 19:47:00 +00:00
Antoine du Hamel
103b8439ca
test_runner: avoid spread operator on arrays
...
PR-URL: https://github.com/nodejs/node/pull/55143
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2024-09-29 15:22:10 +00:00
Colin Ihrig
e32521a7b9
test_runner: close and flush destinations on forced exit
...
This commit updates the test runner to explicitly close and flush
all destination file streams when the --test-force-exit flag is
used.
Fixes: https://github.com/nodejs/node/issues/54327
PR-URL: https://github.com/nodejs/node/pull/55099
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com >
2024-09-28 13:59:06 +00:00
Colin Ihrig
059e08bb21
test_runner: add 'test:summary' event
...
This commit adds a new 'test:summary' event to the test runner's
reporting interface. This new event serves two purposes:
- In the future, the test runner internals will no longer need to
change the process exit code. This may be important to run()
users. Unfortunately, this is a breaking change, so it needs to
be changed in a major version.
- The reporting interface now has a single event that can identify
passing or failing test runs.
Refs: https://github.com/nodejs/node/issues/53867
Refs: https://github.com/nodejs/node/issues/54812
PR-URL: https://github.com/nodejs/node/pull/54851
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2024-09-21 17:41:52 +00:00
Aviv Keller
028c586478
test_runner: reimplement assert.ok to allow stack parsing
...
PR-URL: https://github.com/nodejs/node/pull/54776
Refs: https://github.com/nodejs/help/issues/4461
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2024-09-15 15:53:18 +00:00
Aviv Keller
99bbf80608
test_runner: report coverage thresholds in test:coverage
...
PR-URL: https://github.com/nodejs/node/pull/54813
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2024-09-13 13:31:37 +00:00
cjihrig
e78fd8c0ad
test_runner: apply filtering when tests begin
...
This commit updates the way filtering is applied to tests and
suites. After this change, filters are applied just before the
test/suite is started. The results are the same, but this allows
us to eventually move away from the --test-only flag except
when process level isolation is used.
PR-URL: https://github.com/nodejs/node/pull/54832
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
2024-09-12 12:41:11 -04:00
Antoine du Hamel
7c58645aca
lib: move Symbol[Async]Dispose polyfills to internal/util
...
PR-URL: https://github.com/nodejs/node/pull/54853
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2024-09-10 21:24:56 +00:00
Aviv Keller and Marco Ippolito
9edf4a0856
test_runner: add support for coverage thresholds
...
Co-Authored-By: Marco Ippolito <marcoippolito54@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/54429
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Paolo Insogna <paolo@cowtech.it >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
2024-08-23 17:02:11 +00:00
cjihrig
385ca623e4
test_runner: defer inheriting hooks until run()
...
This commit updates the way the test runner computes inherited
hooks. Instead of computing them when the Test/Suite is
constructed, they are now computed just prior to running the
Test/Suite. The reason is because when multiple test files are
run in the same process, it is possible for the inherited hooks
to change as more files are loaded.
PR-URL: https://github.com/nodejs/node/pull/53927
Fixes: https://github.com/nodejs/node/issues/51548
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2024-08-21 13:39:18 +00:00