summaryrefslogtreecommitdiff
path: root/test/parallel/test-assert.js
diff options
context:
space:
mode:
authorRuben Bridgewater <ruben@bridgewater.de>2018-09-08 02:30:07 +0200
committerRuben Bridgewater <ruben@bridgewater.de>2018-09-11 23:45:07 +0200
commitb5430d782d1c00ecdc421ad28b4f6c5ff62ba972 (patch)
treeb4bb8637e2dbab8bc0455799ba2301346486623a /test/parallel/test-assert.js
parente4dd213516afdff64063682e0d0d46c58499a9f3 (diff)
downloadandroid-node-v8-b5430d782d1c00ecdc421ad28b4f6c5ff62ba972.tar.gz
android-node-v8-b5430d782d1c00ecdc421ad28b4f6c5ff62ba972.tar.bz2
android-node-v8-b5430d782d1c00ecdc421ad28b4f6c5ff62ba972.zip
assert: align argument names
This makes sure the documented argument names and the ones thrown in errors is aligned with the actual argument name. PR-URL: https://github.com/nodejs/node/pull/22760 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Denys Otrishko <shishugi@gmail.com> Reviewed-By: Yuta Hiroto <hello@hiroppy.me>
Diffstat (limited to 'test/parallel/test-assert.js')
-rw-r--r--test/parallel/test-assert.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/test/parallel/test-assert.js b/test/parallel/test-assert.js
index 72ba7d2443..bdbde655d7 100644
--- a/test/parallel/test-assert.js
+++ b/test/parallel/test-assert.js
@@ -348,15 +348,15 @@ try {
}
{
- // Verify that throws() and doesNotThrow() throw on non-function block.
- const testBlockTypeError = (method, block) => {
+ // Verify that throws() and doesNotThrow() throw on non-functions.
+ const testBlockTypeError = (method, fn) => {
common.expectsError(
- () => method(block),
+ () => method(fn),
{
code: 'ERR_INVALID_ARG_TYPE',
type: TypeError,
- message: 'The "block" argument must be of type Function. Received ' +
- `type ${typeof block}`
+ message: 'The "fn" argument must be of type Function. Received ' +
+ `type ${typeof fn}`
}
);
};