diff options
| author | Luca Casonato <lucacasonato@yahoo.com> | 2021-01-05 12:07:27 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-01-05 12:07:27 +0100 |
| commit | a3099798c881ac1be7108c0255e67e182c7080da (patch) | |
| tree | 8cbfc988a7a51e93dfaba4120b8566445015052f /cli/tests/WPT.md | |
| parent | cbc2108525f3a01f4a944104457939b741c9898b (diff) | |
tests: add web platform test runner (#8990)
Co-authored-by: Kitson Kelly <me@kitsonkelly.com>
Diffstat (limited to 'cli/tests/WPT.md')
| -rw-r--r-- | cli/tests/WPT.md | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/cli/tests/WPT.md b/cli/tests/WPT.md new file mode 100644 index 000000000..553fe3263 --- /dev/null +++ b/cli/tests/WPT.md @@ -0,0 +1,34 @@ +## Web Platform Tests + +The WPT are test suites for Web platform specs, like Fetch, WHATWG Streams, or +console. Deno is able to run most `.any.js` and `.window.js` web platform tests. + +This directory contains a `wpt.json` file that is used to configure our WPT test +runner. You can use this json file to set which WPT suites to run, and which +tests we expect to fail (due to bugs or because they are out of scope for Deno). + +To include a new test file to run, add it to the array of test files for the +corresponding suite. For example we want to enable +`streams/readable-streams/general`. The file would then look like this: + +```json +{ + "streams": ["readable-streams/general"] +} +``` + +If you need more configurability over which test cases in a test file of a suite +to run, you can use the object representation. In the example below, we +configure `streams/readable-streams/general` to expect +`ReadableStream can't be constructed with an invalid type` to fail. + +```json +{ + "streams": [ + { + "name": "readable-streams/general", + "expectFail": ["ReadableStream can't be constructed with an invalid type"] + } + ] +} +``` |
