- From: Brad Hill <hillbrad@gmail.com>
- Date: Tue, 24 Jun 2014 16:40:22 -0700
- To: public-test-infra <public-test-infra@w3.org>
- Message-ID: <CAEeYn8j4yshmZ665Z2wozNxU-_syyxw9qa6if2aMZyDmg6FFkw@mail.gmail.com>
The "Contributing" section of README.md in WPT links to the TTWF page for
"How to write and review tests".
There (
http://testthewebforward.org/docs/testharness-tutorial.html#including-metadata
)
the example only shows including it inline with tests:
test(function () {
assert_true(true, "The spec says it's true.");
},
"True is true as per spec",
{
help: "http://w3.org/TR/some-specification#truth-and-beauty",
assert: ["Truth is true, you know."],
author: "Robin Berjon "
});
But when you actually do this in a test, you get:
Metadata property "author" for test: "Inline script in a <script> tag
should not run without an 'unsafe-inline' directive" must have name and
contact information ("name <email>" or "name http(s)://")
Single tests should not have metadata. Move metadata to <head>.
If I go to the testharness.js docs (
http://darobin.github.io/test-harness-tutorial/docs/using-testharness.html#metadata
),
it's similar. It says:
All metadata provided per test will be added to any file-scoped metadata
found in the <head> section of the document. Metadata that is common to all
tests in a file should be placed in the <head>.
But the example again only shows the inline usage:
test(function () {
assert_true(true, "The spec says it's true.");
}, "True is true as per spec", {
help: ["http://www.w3.org/TR/some-specification/#truth-and-beauty",
"http://www.w3.org/TR/other-specification/#truthiness"]
, assert: "Truth is true, you know."
, author: "Robin Berjon <robin@berjon.com>"
, flags: "svg animated"
});
If someone can provide me an authoritative example of including test
metadata in a <head>, I'll submit pull requests to update the documentation
appropriately.
Thank,
Brad
Received on Tuesday, 24 June 2014 23:40:51 UTC