Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit a038fcc

Browse filesBrowse files
fhinkelMyles Borins
authored andcommitted
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 <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>
1 parent bd99b2d commit a038fcc
Copy full SHA for a038fcc

File tree

Expand file treeCollapse file tree

1 file changed

+10
-0
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+10
-0
lines changed
Open diff view settings
Collapse file

‎test/parallel/test-instanceof.js‎

Copy file name to clipboard
+10Lines changed: 10 additions & 0 deletions
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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.