Skip to content

data tests

Sid Vishnoi edited this page Jul 8, 2020 · 11 revisions


Configuration options

W3C Configuration options

Linter 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


The data-tests attribute takes a list of comma-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.

  var respecConfig = {
    testSuiteURI: "",

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