mirror of
https://github.com/rustwasm/wasm-bindgen.git
synced 2024-11-28 14:27:36 +03:00
f8d336d711
* Add a test harness to directly execute wasm tests This commits adds a few new crates and infrastructure to enable comands like: cargo test --target wasm32-unknown-unknown The intention here is to make it as low-friction as possible to write wasm tests and also have them execute in a reasonable amount of time. Eventually this is also hopefully enough support to do things like headless testing! For now though this is defintely MVP status rather than fully fleshed out. There's some more information at `crates/test/README.md` about how it works and how to use it, but for now this is mainly intended to play around with locally in this repository for our own tests. * Port a numbe of `js-sys` tests to the new test framework This commit ports a number of existing tests for the `js-sys` crate over to the new test framework created in the previous commit, showing off how they can be executed as well as drastictlly simplifying the tests themselves! This is intended to be a proof of concept for now which we can refine over time. This should also show off that it's possible to incrementally move over to the new test framework.
30 lines
800 B
Bash
30 lines
800 B
Bash
rustc \
|
|
+nightly \
|
|
--crate-name \
|
|
wasm_bindgen_test_runner \
|
|
crates/test-runner/src/main.rs \
|
|
--crate-type \
|
|
bin \
|
|
--emit=dep-info,link \
|
|
-C \
|
|
opt-level=s \
|
|
-C \
|
|
panic=abort \
|
|
-C \
|
|
lto \
|
|
-C \
|
|
metadata=de5c24b259631256 \
|
|
-C \
|
|
extra-filename=-de5c24b259631256 \
|
|
--out-dir \
|
|
/home/alex/code/wasm-bindgen/target/release/deps \
|
|
-L \
|
|
dependency=/home/alex/code/wasm-bindgen/target/release/deps \
|
|
--extern \
|
|
failure=/home/alex/code/wasm-bindgen/target/release/deps/libfailure-7c7642ad9a5ea78f.rlib \
|
|
--extern \
|
|
wasm_bindgen_cli_support=/home/alex/code/wasm-bindgen/target/release/deps/libwasm_bindgen_cli_support-319f8cb472c7d7e6.rlib \
|
|
-L \
|
|
native=/home/alex/code/wasm-bindgen/target/release/build/backtrace-sys-219bc8940e273b6b/out \
|
|
-Z time-passes
|