Skip to content

Commit 9ce49ee

Browse files
committed
skip tentative and service worker tests
1 parent 2f3422b commit 9ce49ee

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

test/common/wpt.js

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,9 @@ class StatusRuleSet {
251251

252252
// A specification of WPT test
253253
class WPTTestSpec {
254+
255+
#content;
256+
254257
/**
255258
* @param {string} mod name of the WPT module, e.g.
256259
* 'html/webappapis/microtask-queuing'
@@ -298,7 +301,8 @@ class WPTTestSpec {
298301
}
299302

300303
getContent() {
301-
return fs.readFileSync(this.getAbsolutePath(), 'utf8');
304+
this.#content ??= fs.readFileSync(this.getAbsolutePath(), 'utf8');
305+
return this.#content;
302306
}
303307
}
304308

@@ -914,6 +918,17 @@ class WPTRunner {
914918
continue;
915919
}
916920

921+
if (filename.includes('tentative')) {
922+
this.skip(filename, [ 'test makes assertions not yet required by any specification' ]);
923+
continue;
924+
}
925+
926+
const isServiceWorker = spec.getContent().includes('importScripts(');
927+
if (isServiceWorker) {
928+
this.skip(filename, [ 'importScripts is not defined' ]);
929+
continue;
930+
}
931+
917932
queue.push(spec);
918933
}
919934
return queue;

0 commit comments

Comments
 (0)