Skip to content

Commit eb80381

Browse files
committed
Skip tests that depend on native structuredClone() if not available
The polyfill isn't 100% precise
1 parent 6e25dca commit eb80381

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

spec/core/SpecSpec.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,10 @@ describe('Spec', function() {
114114
});
115115

116116
it('throws if the value is not structured-cloneable', function() {
117+
if (typeof structuredClone === 'undefined') {
118+
pending('This test requires native structuredClone');
119+
}
120+
117121
const spec = new privateUnderTest.Spec({
118122
queueableFn: { fn: () => {} }
119123
});

spec/core/SuiteSpec.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -416,6 +416,10 @@ describe('Suite', function() {
416416
});
417417

418418
it('throws if the value is not structured-cloneable', function() {
419+
if (typeof structuredClone === 'undefined') {
420+
pending('This test requires native structuredClone');
421+
}
422+
419423
const suite = new privateUnderTest.Suite({});
420424

421425
expect(function() {

0 commit comments

Comments
 (0)