diff options
author | Ruben Bridgewater <ruben@bridgewater.de> | 2017-06-16 23:38:58 +0200 |
---|---|---|
committer | Refael Ackermann <refack@gmail.com> | 2017-06-22 13:54:53 -0400 |
commit | 3e178848a5f5f128f38b0ede5ab73210194c8aa6 (patch) | |
tree | b80176d9838143fd5dc52e2912c5c10ba22e27b5 /test/parallel/test-process-cpuUsage.js | |
parent | 2a46e57d139a93caaff4dc63000e61b9a27669bb (diff) | |
download | android-node-v8-3e178848a5f5f128f38b0ede5ab73210194c8aa6.tar.gz android-node-v8-3e178848a5f5f128f38b0ede5ab73210194c8aa6.tar.bz2 android-node-v8-3e178848a5f5f128f38b0ede5ab73210194c8aa6.zip |
errors: improve ERR_INVALID_ARG_TYPE
The error message might be misleading if an object property
was the issue and not the argument itself.
Fix this by checking if a argument or a property is passed
to the handler function.
PR-URL: https://github.com/nodejs/node/pull/13730
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Diffstat (limited to 'test/parallel/test-process-cpuUsage.js')
-rw-r--r-- | test/parallel/test-process-cpuUsage.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/parallel/test-process-cpuUsage.js b/test/parallel/test-process-cpuUsage.js index 6f647a4358..5f51f0ac83 100644 --- a/test/parallel/test-process-cpuUsage.js +++ b/test/parallel/test-process-cpuUsage.js @@ -34,13 +34,13 @@ for (let i = 0; i < 10; i++) { const invalidUserArgument = common.expectsError({ code: 'ERR_INVALID_ARG_TYPE', type: TypeError, - message: 'The "preValue.user" argument must be of type Number' + message: 'The "preValue.user" property must be of type Number' }); const invalidSystemArgument = common.expectsError({ code: 'ERR_INVALID_ARG_TYPE', type: TypeError, - message: 'The "preValue.system" argument must be of type Number' + message: 'The "preValue.system" property must be of type Number' }); |