Skip to content

Commit a038fcc

Browse files
fhinkelMyles Borins
authored and
Myles Borins
committed
test: add regression test for instanceof
Add regression test for issue #7592. The issue was fixed in upstream V8 and this test case was previously added with a manual cherry pick for v6.x. Related to: #7638 and #7592. PR-URL: #9178 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent bd99b2d commit a038fcc

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

test/parallel/test-instanceof.js

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
'use strict';
2+
require('../common');
3+
const assert = require('assert');
4+
5+
6+
// Regression test for instanceof, see
7+
// https://github.com/nodejs/node/issues/7592
8+
const F = () => {};
9+
F.prototype = {};
10+
assert(Object.create(F.prototype) instanceof F);

0 commit comments

Comments
 (0)