Sha256: b6d45f2a177525e1fd9b7c8a0d47f0bc156a9327795bcb4d96716851f94ff2db

Contents?: true

Size: 1.17 KB

Versions: 19

Compression:

Stored size: 1.17 KB

Contents

# Running `wasm-bindgen`'s Tests

## Wasm Tests on Node and Headless Browsers

These are the largest test suites, and most common to run in day to day
`wasm-bindgen` development. These tests are compiled to Wasm and then run in
Node.js or a headless browser via the WebDriver protocol.

```bash
cargo test --target wasm32-unknown-unknown
```

See [the `wasm-bindgen-test` crate's
`README.md`](https://github.com/rustwasm/wasm-bindgen/blob/master/crates/test/README.md)
for details and configuring which headless browser is used.

## Sanity Tests for `wasm-bindgen` on the Native Host Target

This small test suite just verifies that exported `wasm-bindgen` methods can
still be used on the native host's target.

```
cargo test
```

## The Web IDL Frontend's Tests

```
cargo test -p webidl-tests --target wasm32-unknown-unknown
```

## The Macro UI Tests

These tests assert that we have reasonable error messages that point to the
right source spans when the `#[wasm_bindgen]` proc-macro is misused.

```
cargo test -p ui-tests
```

## The `js-sys` Tests

See [the `js-sys` testing page](js-sys/testing.html).

## The `web-sys` Tests

See [the `web-sys` testing page](web-sys/testing.html).

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
wasmtime-14.0.4 ./ext/cargo-vendor/wasm-bindgen-0.2.87/guide/src/contributing/testing.md
wasmtime-14.0.3 ./ext/cargo-vendor/wasm-bindgen-0.2.87/guide/src/contributing/testing.md
wasmtime-14.0.1 ./ext/cargo-vendor/wasm-bindgen-0.2.87/guide/src/contributing/testing.md
wasmtime-14.0.0 ./ext/cargo-vendor/wasm-bindgen-0.2.87/guide/src/contributing/testing.md
wasmtime-13.0.0 ./ext/cargo-vendor/wasm-bindgen-0.2.87/guide/src/contributing/testing.md
wasmtime-12.0.1 ./ext/cargo-vendor/wasm-bindgen-0.2.87/guide/src/contributing/testing.md
wasmtime-12.0.0 ./ext/cargo-vendor/wasm-bindgen-0.2.87/guide/src/contributing/testing.md
wasmtime-11.0.0 ./ext/cargo-vendor/wasm-bindgen-0.2.87/guide/src/contributing/testing.md
wasmtime-10.0.1 ./ext/cargo-vendor/wasm-bindgen-0.2.87/guide/src/contributing/testing.md
wasmtime-10.0.0 ./ext/cargo-vendor/wasm-bindgen-0.2.87/guide/src/contributing/testing.md
wasmtime-9.0.4 ./ext/cargo-vendor/wasm-bindgen-0.2.87/guide/src/contributing/testing.md
wasmtime-9.0.1 ./ext/cargo-vendor/wasm-bindgen-0.2.86/guide/src/contributing/testing.md
wasmtime-8.0.0 ./ext/cargo-vendor/wasm-bindgen-0.2.84/guide/src/contributing/testing.md
wasmtime-7.0.0 ./ext/cargo-vendor/wasm-bindgen-0.2.84/guide/src/contributing/testing.md
wasmtime-6.0.1 ./ext/cargo-vendor/wasm-bindgen-0.2.84/guide/src/contributing/testing.md
wasmtime-6.0.0 ./ext/cargo-vendor/wasm-bindgen-0.2.84/guide/src/contributing/testing.md
wasmtime-5.0.0 ./ext/cargo-vendor/wasm-bindgen-0.2.83/guide/src/contributing/testing.md
wasmtime-0.4.1 ./ext/cargo-vendor/wasm-bindgen-0.2.83/guide/src/contributing/testing.md
wasmtime-0.4.0 ./ext/cargo-vendor/wasm-bindgen-0.2.83/guide/src/contributing/testing.md