From 6475af3743e96a5208e69211ce2b7327e4362201 Mon Sep 17 00:00:00 2001 From: Denis Pushkarev Date: Wed, 17 Nov 2021 21:11:04 +0700 Subject: [PATCH] add a workaround for `node-qunit` bug https://github.com/qunitjs/node-qunit/issues/146 --- tests/pure/web.structured-clone.js | 3 ++- tests/tests/web.structured-clone.js | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/pure/web.structured-clone.js b/tests/pure/web.structured-clone.js index 8184441f0f9d..79671a51d58e 100644 --- a/tests/pure/web.structured-clone.js +++ b/tests/pure/web.structured-clone.js @@ -30,7 +30,8 @@ QUnit.module('structuredClone', () => { cloneTest(value, (orig, clone) => { assert.notEqual(orig, clone, 'clone should have different reference'); assert.same(typeof clone, 'object', 'clone should be an object'); - assert.same(getPrototypeOf(orig), getPrototypeOf(clone), 'clone should have same prototype'); + // https://github.com/qunitjs/node-qunit/issues/146 + assert.ok(getPrototypeOf(orig) === getPrototypeOf(clone), 'clone should have same prototype'); verifyFunc(orig, clone); }); } diff --git a/tests/tests/web.structured-clone.js b/tests/tests/web.structured-clone.js index 4e9c6e4d81dc..139b036c2ef7 100644 --- a/tests/tests/web.structured-clone.js +++ b/tests/tests/web.structured-clone.js @@ -23,7 +23,8 @@ QUnit.module('structuredClone', () => { cloneTest(value, (orig, clone) => { assert.notEqual(orig, clone, 'clone should have different reference'); assert.same(typeof clone, 'object', 'clone should be an object'); - assert.same(getPrototypeOf(orig), getPrototypeOf(clone), 'clone should have same prototype'); + // https://github.com/qunitjs/node-qunit/issues/146 + assert.ok(getPrototypeOf(orig) === getPrototypeOf(clone), 'clone should have same prototype'); verifyFunc(orig, clone); }); }