Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fixup! pass valid test value
The value must be a function to test the type of the prototype since validators first check if the value is a function.
  • Loading branch information
VoltrexKeyva authored Jun 1, 2021
commit 43c44914c681b0a7c482e2cd2ad7e94096dd33e4
8 changes: 7 additions & 1 deletion test/parallel/test-util-inherits.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,15 @@ assert.strictEqual(e.d(), 'd');
assert.strictEqual(e.e(), 'e');
assert.strictEqual(e.constructor, E);

function F() {
this.test = 'test';
}

F.prototype = null;

// Should throw with invalid arguments
assert.throws(() => {
inherits(A, {});
inherits(A, F);
}, {
code: 'ERR_INVALID_ARG_TYPE',
name: 'TypeError',
Expand Down