From d62e7bd1f92280fb9fd0ba3ccc403fbbb4830fa8 Mon Sep 17 00:00:00 2001 From: Franziska Hinkelmann Date: Wed, 19 Oct 2016 10:54:13 +0200 Subject: [PATCH] test: add regression test for instanceof MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add regression test for issue https://github.com/nodejs/node/issues/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: https://github.com/nodejs/node/pull/7638 and https://github.com/nodejs/node/issues/7592. PR-URL: https://github.com/nodejs/node/pull/9178 Reviewed-By: Ben Noordhuis Reviewed-By: Michaƫl Zasso Reviewed-By: Colin Ihrig Reviewed-By: James M Snell --- test/parallel/test-instanceof.js | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 test/parallel/test-instanceof.js diff --git a/test/parallel/test-instanceof.js b/test/parallel/test-instanceof.js new file mode 100644 index 00000000000000..45960621a66e50 --- /dev/null +++ b/test/parallel/test-instanceof.js @@ -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);