Skip to content

Commit b0605e3

Browse files
committed
add a workaround for node-qunit bug
https://github.com/qunitjs/node-qunit/issues/146
1 parent 817055e commit b0605e3

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

tests/pure/web.structured-clone.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ QUnit.module('structuredClone', () => {
3030
cloneTest(value, (orig, clone) => {
3131
assert.notEqual(orig, clone, 'clone should have different reference');
3232
assert.same(typeof clone, 'object', 'clone should be an object');
33-
assert.same(getPrototypeOf(orig), getPrototypeOf(clone), 'clone should have same prototype');
33+
// https://github.com/qunitjs/node-qunit/issues/146
34+
assert.ok(getPrototypeOf(orig) === getPrototypeOf(clone), 'clone should have same prototype');
3435
verifyFunc(orig, clone);
3536
});
3637
}

tests/tests/web.structured-clone.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ QUnit.module('structuredClone', () => {
2323
cloneTest(value, (orig, clone) => {
2424
assert.notEqual(orig, clone, 'clone should have different reference');
2525
assert.same(typeof clone, 'object', 'clone should be an object');
26-
assert.same(getPrototypeOf(orig), getPrototypeOf(clone), 'clone should have same prototype');
26+
// https://github.com/qunitjs/node-qunit/issues/146
27+
assert.ok(getPrototypeOf(orig) === getPrototypeOf(clone), 'clone should have same prototype');
2728
verifyFunc(orig, clone);
2829
});
2930
}

0 commit comments

Comments
 (0)