Skip to content

Commit

Permalink
Add some docs around WPT test failures
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffcharles committed Sep 6, 2023
1 parent 6b70c93 commit ba8c9e4
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,7 @@ The versions for `javy` and `javy-apis` must always be the same. So a version ch
After publishing a release, immediately update the version number to the next patch version with an `-alpha.1` suffix. The first time an additive change is made, reset the patch version to `0` and increment the minor version and reset the suffix to `-alpha.1`. When making additional additive changes, increment the number in the suffix, for example `-alpha.2`. The first time a breaking change is made, reset the patch version and minor version to `0` and increment the major version and reset the suffix to `-alpha.1`. When making additional breaking changes, increment the number in the suffix, for example `-alpha.2`.

When releasing, remove the suffix and then publish.

## Web platform tests (WPT)

We run a subset of the web platform test suite during continuous integration. We recommend reading our suite's [WPT readme](../wpt/README.md) for tips on how to add tests to the suite and what to do when tests won't pass.
11 changes: 11 additions & 0 deletions wpt/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,16 @@ $ npm test

Test suites can be added in `test_spec.js`. Individual tests can be ignored by including their name in the test's ignore list.

## Tips for getting tests to pass

- Adding tests to the ignored list is acceptable if there is no intent to support the feature the test is testing.
- We highly recommend running the WPT suite with the `experimental_event_loop` Cargo feature enabled on the `javy-core` crate so tests relying on the event loop are able to pass.
- Strongly consider adding tests in Rust for APIs you're adding to get faster feedback on failures the WPT suite catches while working on a fix.

### If you need to change upstream tests

- You may need to copy the test into the `custom_tests` directory and make small changes, then have the `test_spec.js` file run the copied test file instead of the upstream one.
- An example of this is commenting out small parts of test cases that are testing functionality that is intentionally not supported (for example, UTF-16 support for `TextDecoder`).

[wpt]: https://wpt.fyi
[rollup]: https://rollupjs.org

0 comments on commit ba8c9e4

Please sign in to comment.