From c6b6c92185316e13738e6fa931fdd5303e381e46 Mon Sep 17 00:00:00 2001 From: Ruben Bridgewater Date: Mon, 19 Mar 2018 13:33:46 +0100 Subject: lib: always show ERR_INVALID_ARG_TYPE received part This makes a effort to make sure all of these errors will actually also show the received input. On top of that it refactors a few tests for better maintainability. It will also change the returned type to always be a simple typeof instead of special handling null. PR-URL: https://github.com/nodejs/node/pull/19445 Reviewed-By: James M Snell Reviewed-By: Matteo Collina Reviewed-By: Joyee Cheung Reviewed-By: Anna Henningsen --- test/parallel/test-process-exception-capture-errors.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'test/parallel/test-process-exception-capture-errors.js') diff --git a/test/parallel/test-process-exception-capture-errors.js b/test/parallel/test-process-exception-capture-errors.js index 7053497ada..d2f5b86177 100644 --- a/test/parallel/test-process-exception-capture-errors.js +++ b/test/parallel/test-process-exception-capture-errors.js @@ -6,7 +6,8 @@ common.expectsError( { code: 'ERR_INVALID_ARG_TYPE', type: TypeError, - message: 'The "fn" argument must be one of type Function or null' + message: 'The "fn" argument must be one of type Function or null. ' + + 'Received type number' } ); -- cgit v1.2.1