data tests - speced/respec GitHub Wiki
Applies to: <p>, <li>, and other elements containing testable assertions
Links one or more WPT test files to a prose assertion. Creates a collapsible "Tests" detail box on the element.
<script>
var respecConfig = {
testSuiteURI: "https://wpt.fyi/payment-request/",
};
</script>
<p data-tests="payment-request-basics.https.html, timeout.html">
The user agent MUST reject the Promise if the user cancels.
</p>- Value is a comma-separated list of test file paths, relative to
testSuiteURI -
testSuiteURImust be set inrespecConfig— ReSpec will warn if it's missing - Enable the
wpt-tests-existlinting rule to verify all referenced tests actually exist in WPT - Works best on
<p>and<li>elements containing normative assertions