* Add `JsCast` to `wasm_bindgen::prelude`
`JsCast` is a very commonly used trait, but for some reason has never been added to `wasm_bindgen::prelude`, leading to the constant annoyance of having to manually import it.
* Remove redundant imports
* Add a test that examples don't throw any errors
TODO:
- run all the tests, not just the ones which use webpack (also an issue with CI)
- fix webxr test
- run in CI
- share WebDriver instance between tests
- maybe ditch async, since we don't really need it here and it adds a bunch of dependencies and build time.
* Disable testing WebXR example
It isn't supported in Firefox yet, which is where we're running our tests.
* Test examples that aren't built with webpack
* Remove `WEBDRIVER` environment variable
It wouldn't have worked anyway because at least for the moment, I'm using one WebDriver session per test, and Firefox at least only allows one session to be connected.
I would like to make them share a session, in which case I could add this back, but I can't right now because Firefox hasn't implemented `LogEntry.source` yet, which is needed to figure out which log entries should fail which tests.
* Run in CI
* Use `Once` instead of `Mutex`
* Build `webxr` and `synchronous-instantiation` in CI
Although we can't test them, we can still build them.
* Add missing '`'
* Fix running of tests
* Only include dev deps when not compiling for wasm
* oops, those are the native tests
* Create build dirs before copying to them
* Install binaryen
* decompress
* Follow redirects
* Set `PATH` properly
* Use an absolute path
* Don't symlink `node_modules` and fix artifact download
* Enable `web_sys_unstable_apis`
This is needed for the `webxr` example.
* Increase timeout to 10s
* Increase timeout to 20s
This seems excessive but 10s is still sometimes failing.
* Disable testing the webgl example
* Add binaryen to PATH directly after installing
* Properly download the raytrace example artifacts
* Disable example tests instead of enabling everything else
* Move to a separate `example-tests` crate
There isn't much of a reason to use `Closure::wrap` over `Closure::new` anymore, so this changes `wasm-bindgen`'s examples to use `Closure::new` as the recommended method of creating closures.