summaryrefslogtreecommitdiff
path: root/test/parallel/test-util-inspect.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/parallel/test-util-inspect.js')
-rw-r--r--test/parallel/test-util-inspect.js12
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'
- })
+ }
);
}