From f376ad411bef6c8a7a9edad9db4fe1f475233c75 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 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. --- 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);