summaryrefslogtreecommitdiff
path: root/test/parallel/test-assert.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/parallel/test-assert.js')
-rw-r--r--test/parallel/test-assert.js34
1 files changed, 21 insertions, 13 deletions
diff --git a/test/parallel/test-assert.js b/test/parallel/test-assert.js
index c061551604..478945156e 100644
--- a/test/parallel/test-assert.js
+++ b/test/parallel/test-assert.js
@@ -192,32 +192,40 @@ a.throws(() => thrower(TypeError), (err) => {
const noop = () => {};
assert.throws(
() => { a.throws((noop)); },
- common.expectsError({
+ {
code: 'ERR_ASSERTION',
- message: /^Missing expected exception\.$/,
- operator: 'throws'
- }));
+ message: 'Missing expected exception.',
+ operator: 'throws',
+ actual: undefined,
+ expected: undefined
+ });
assert.throws(
() => { a.throws(noop, TypeError); },
- common.expectsError({
+ {
code: 'ERR_ASSERTION',
- message: /^Missing expected exception \(TypeError\)\.$/
- }));
+ message: 'Missing expected exception (TypeError).',
+ actual: undefined,
+ expected: TypeError
+ });
assert.throws(
() => { a.throws(noop, 'fhqwhgads'); },
- common.expectsError({
+ {
code: 'ERR_ASSERTION',
- message: /^Missing expected exception: fhqwhgads$/
- }));
+ message: 'Missing expected exception: fhqwhgads',
+ actual: undefined,
+ expected: undefined
+ });
assert.throws(
() => { a.throws(noop, TypeError, 'fhqwhgads'); },
- common.expectsError({
+ {
code: 'ERR_ASSERTION',
- message: /^Missing expected exception \(TypeError\): fhqwhgads$/
- }));
+ message: 'Missing expected exception (TypeError): fhqwhgads',
+ actual: undefined,
+ expected: TypeError
+ });
let threw = false;
try {