wpt tests exist - speced/respec GitHub Wiki
wpt-tests-exist linting rule
Default: false
Warns when a data-tests attribute references a WPT test file that doesn't exist in the web-platform-tests repository.
How to enable
var respecConfig = {
testSuiteURI: "https://github.com/web-platform-tests/wpt/tree/HEAD/payment-request/",
lint: {
"wpt-tests-exist": true,
},
};
Example violation
<!-- BAD: nonexistent-test.html doesn't exist in WPT -->
<p data-tests="valid-test.html,nonexistent-test.html"></p>
How to fix
Either correct the test path or remove the reference to the non-existent test.
Notes
- Requires
testSuiteURIto be set — ReSpec uses it to determine the WPT base path - Checks against the live WPT repository on GitHub
- See
data-testsfor how to annotate spec sections with test references