diff options
Diffstat (limited to 'test/parallel/test-util-inspect.js')
-rw-r--r-- | test/parallel/test-util-inspect.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/test/parallel/test-util-inspect.js b/test/parallel/test-util-inspect.js index f522abf7c2..4383cbb0d4 100644 --- a/test/parallel/test-util-inspect.js +++ b/test/parallel/test-util-inspect.js @@ -1136,22 +1136,22 @@ if (typeof Symbol !== 'undefined') { JSON.stringify(oldOptions) ); - assert.throws(() => { + common.expectsError(() => { util.inspect.defaultOptions = null; - }, common.expectsError({ + }, { code: 'ERR_INVALID_ARG_TYPE', type: TypeError, message: 'The "options" argument must be of type Object' - }) + } ); - assert.throws(() => { + common.expectsError(() => { util.inspect.defaultOptions = 'bad'; - }, common.expectsError({ + }, { code: 'ERR_INVALID_ARG_TYPE', type: TypeError, message: 'The "options" argument must be of type Object' - }) + } ); } |