diff options
author | Rich Trott <rtrott@gmail.com> | 2017-07-17 05:15:11 -0700 |
---|---|---|
committer | Rich Trott <rtrott@gmail.com> | 2017-07-20 11:11:44 -0700 |
commit | 43e105f6453d50bb667a028d8e85d1882818d16a (patch) | |
tree | 1c5a5266c74d96c77f34198d0ee3f73d211ef986 /test/parallel/test-process-hrtime.js | |
parent | 7fdcb68dc3db6e2765f06ad3e43af34c51a6bb70 (diff) | |
download | android-node-v8-43e105f6453d50bb667a028d8e85d1882818d16a.tar.gz android-node-v8-43e105f6453d50bb667a028d8e85d1882818d16a.tar.bz2 android-node-v8-43e105f6453d50bb667a028d8e85d1882818d16a.zip |
process: improve hrtime() error message
Change error message from the form this format:
The "time" array must have a length of 2. Received length 0
...to this format:
The array "time" (length 0) must be of length 2.
PR-URL: https://github.com/nodejs/node/pull/14324
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Diffstat (limited to 'test/parallel/test-process-hrtime.js')
-rw-r--r-- | test/parallel/test-process-hrtime.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/parallel/test-process-hrtime.js b/test/parallel/test-process-hrtime.js index faf05fef11..5ca9be72d1 100644 --- a/test/parallel/test-process-hrtime.js +++ b/test/parallel/test-process-hrtime.js @@ -45,21 +45,21 @@ assert.throws(() => { }, common.expectsError({ code: 'ERR_INVALID_ARRAY_LENGTH', type: TypeError, - message: 'The "time" array must have a length of 2. Received length 0' + message: 'The array "time" (length 0) must be of length 2.' })); assert.throws(() => { process.hrtime([1]); }, common.expectsError({ code: 'ERR_INVALID_ARRAY_LENGTH', type: TypeError, - message: 'The "time" array must have a length of 2. Received length 1' + message: 'The array "time" (length 1) must be of length 2.' })); assert.throws(() => { process.hrtime([1, 2, 3]); }, common.expectsError({ code: 'ERR_INVALID_ARRAY_LENGTH', type: TypeError, - message: 'The "time" array must have a length of 2. Received length 3' + message: 'The array "time" (length 3) must be of length 2.' })); function validateTuple(tuple) { |