mirror of
https://github.com/nodejs/node.git
synced 2025-08-17 06:38:47 +02:00
![]() 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> |
||
---|---|---|
.. | ||
mock | ||
reporter | ||
coverage.js | ||
harness.js | ||
runner.js | ||
snapshot.js | ||
test.js | ||
tests_stream.js | ||
utils.js |