node/lib/internal/test_runner
Tobias Nießen 5469d04f8f
lib: fix misleading argument of validateUint32
The type of the argument `positive` was declared as `boolean|number`,
which is misleading because the function treats it as a boolean only.
Some call sites even passed numbers, specifically, either `0` or `1`,
which happen to work as expected because they are interpreted as `false`
and `true`, respectively. However, passing `2` would silently lead to
unexpected behavior. Thus, strictly make the argument a boolean.

PR-URL: https://github.com/nodejs/node/pull/53307
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io>
Reviewed-By: Zeyu "Alex" Yang <himself65@outlook.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2024-06-05 22:59:05 +00:00
..
mock test_runner: support module mocking 2024-05-19 05:09:09 +00:00
reporter test_runner: display failed test stack trace with dot reporter 2024-05-07 14:30:25 +03:00
coverage.js test_runner: calculate executed lines using source map 2024-06-05 22:25:06 +00:00
harness.js test_runner: add snapshot testing 2024-05-30 09:07:17 -04:00
runner.js test_runner: handle file rename and deletion under watch mode 2024-06-02 08:11:30 +00:00
snapshot.js test_runner: add snapshot testing 2024-05-30 09:07:17 -04:00
test.js lib: fix misleading argument of validateUint32 2024-06-05 22:59:05 +00:00
tests_stream.js test_runner,doc: align documentation with actual stdout/stderr behavior 2024-05-28 19:44:16 +00:00
utils.js test_runner: add snapshot testing 2024-05-30 09:07:17 -04:00