Skip to content

Commit 7463d5b

Browse files
committed
test(wpt): filter runnable test files
1 parent f5b0fdb commit 7463d5b

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

test/wpt/runner/runner/runner.mjs

+6-2
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ export class WPTRunner extends EventEmitter {
6666
this.#folderPath = join(testPath, folder)
6767
this.#files.push(...WPTRunner.walk(
6868
this.#folderPath,
69-
(file) => file.endsWith('.js')
69+
(file) => file.endsWith('.any.js') && !file.includes('.tentative.')
7070
))
7171
this.#status = JSON.parse(readFileSync(join(statusPath, `${folder}.status.json`)))
7272
this.#url = url
@@ -112,14 +112,18 @@ export class WPTRunner extends EventEmitter {
112112
const code = test.includes('.sub.')
113113
? handlePipes(readFileSync(test, 'utf-8'), this.#url)
114114
: readFileSync(test, 'utf-8')
115+
if (code.includes('importScripts(')) {
116+
total -= 1
117+
return undefined
118+
}
115119
const meta = this.resolveMeta(code, test)
116120

117121
if (meta.variant.length) {
118122
total += meta.variant.length - 1
119123
}
120124

121125
return [test, code, meta]
122-
})
126+
}).filter(Boolean)
123127

124128
for (const [test, code, meta] of files) {
125129
if (this.#status[basename(test)]?.skip) {

0 commit comments

Comments
 (0)