Skip to content
Marcos Cáceres edited this page Jul 27, 2017 · 11 revisions

The data-tests attribute takes a list of space-separated URLs, allowing you to link tests to testable assertions. This will add a details drop down to the testable assertion, with an unordered list of tests.

The data-test works together with the testSuiteURI config option, so it must be present or ReSpec will yell at you.

It's best used with <p> and <li> elements.

Examples of usage

<script>
const respecConfig = {
 testSuiteURI: "https://wpt.fyi/payment-request/",
};
</script>

<p data-tests="test-1.html test-2.html">
  The user agent MUST do this stuff...  
</p>

Guides

Configuration options

W3C Configuration options

Linter rules

Internal properties

Handled by ReSpec for you.

Special <section> IDs

HTML elements

Custom Elements

WebIDL

HTML attributes

CSS Classes

Special properties

Clone this wiki locally