File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed
Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -251,6 +251,9 @@ class StatusRuleSet {
251251
252252// A specification of WPT test
253253class 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 ;
You can’t perform that action at this time.
0 commit comments