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 <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
  • Loading branch information
fhinkel authored and jasnell committed Oct 20, 2016
1 parent 2cdd5cc commit d62e7bd
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 d62e7bd

Please sign in to comment.