We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 200961b commit 888d1c1Copy full SHA for 888d1c1
test/parallel/test-util-inherits.js
@@ -75,6 +75,12 @@ assert.strictEqual(e.e(), 'e');
75
assert.strictEqual(e.constructor, E);
76
77
// should throw with invalid arguments
78
-assert.throws(function() { inherits(A, {}); }, TypeError);
79
-assert.throws(function() { inherits(A, null); }, TypeError);
80
-assert.throws(function() { inherits(null, A); }, TypeError);
+assert.throws(function() {
+ inherits(A, {});
+}, /^TypeError: The super constructor to "inherits" must have a prototype$/);
81
82
+ inherits(A, null);
83
+}, /^TypeError: The super constructor to "inherits" must not be null or undefined$/); // eslint-disable-line max-len
84
85
+ inherits(null, A);
86
+}, /^TypeError: The constructor to "inherits" must not be null or undefined$/);
0 commit comments