Skip to content

Commit

Permalink
test: add regression test for instanceof
Browse files Browse the repository at this point in the history
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 <info@bnoordhuis.nl>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
fhinkel authored and Myles Borins committed Nov 15, 2016
1 parent bd99b2d commit a038fcc
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/parallel/test-instanceof.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
'use strict';
require('../common');
const assert = require('assert');


// Regression test for instanceof, see
// https://github.com/nodejs/node/issues/7592
const F = () => {};
F.prototype = {};
assert(Object.create(F.prototype) instanceof F);

0 comments on commit a038fcc

Please sign in to comment.