From a038fcc307787190d379ae8f3afd8a32c0be6cfe 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 0000000000..45960621a6 --- /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);