Content-Length: 277886 | pFad | http://github.com/bytecodealliance/javy/tree/main/wpt

08 javy/wpt at main · bytecodealliance/javy · GitHub
Skip to content

Latest commit

 

History

History

wpt

Web Platform Tests

This is a bit of a hacky harness to run Web Platform Tests against Javy.

Setup

Web Platform Tests are included as a submodule.

$ git submodule init
$ git submodule update
$ npm i

Testing

This command uses rollup with a custom plugin to bundle all selected tests into one bundle. It then uses the local build of javy to turn that bundle into a WebAssembly module, and finally runs that WebAssembly module using wasmtime.

Make sure you have wasmtime installed and built javy locally.

If wasmtime generates no output, all tests have been passed. Otherwise, it's a failure.

$ npm test

Test selection

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.
  • 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).








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/bytecodealliance/javy/tree/main/wpt

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy