la10736 / rstest

Fixture-based test framework for Rust
Apache License 2.0
1.04k stars 39 forks source link

consider adding a `wasm-bindgen` feature #260

Open themighty1 opened 3 weeks ago

themighty1 commented 3 weeks ago

Hi, I have a test which uses rstest's #[timeout(Duration::from_millis(10000))]

When compiling it with wasm-pack test --release --chrome and running it in the browser, I was getting errors.

I was able to get rid of the errors by having these deps

[dev-dependencies]
rstest = { version = "0.21", features = ["async-timeout"] }
# force `rstest` to depend on `futures-timer` with a wasm-compatible feature
futures-timer = { version = "*", features = ["wasm-bindgen"] }

Maybe rstest could itself have a wasm-bindgen feature which enables the wasm-bindgen feature of futures-timer?

la10736 commented 3 weeks ago

Ok, it seams fine.

Can you provide a minimum example to reproduce it?