Skip to content
Marcos Caceres edited this page Mar 27, 2026 · 10 revisions

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 testSuiteURI to be set — ReSpec uses it to determine the WPT base path
  • Checks against the live WPT repository on GitHub
  • See data-tests for how to annotate spec sections with test references

Guides

Configuration options

W3C Configuration options

Linting rules

Internal properties

Handled by ReSpec for you.

Special <section> IDs

HTML elements

Custom Elements

HTML attributes

CSS Classes

Special properties

Clone this wiki locally