Skip to content

Commit 85c93f0

Browse files
Ari BreitkreuzaDogCalledSpot
Ari Breitkreuz
authored andcommitted
Ensure interoperability with normal cargo test
1 parent 76c48f1 commit 85c93f0

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

crates/test/Cargo.toml

+2
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ wasm-bindgen = { path = '../..', version = '0.2.90' }
2020
wasm-bindgen-futures = { path = '../futures', version = '0.4.40' }
2121
wasm-bindgen-test-macro = { path = '../test-macro', version = '=0.3.40' }
2222
gg-alloc = { version = "1.0", optional = true }
23+
24+
[target.'cfg(target_arch = "wasm32")'.dependencies]
2325
minicov = { version = "0.3", optional = true }
2426

2527
[lib]

crates/test/src/lib.rs

+4
Original file line numberDiff line numberDiff line change
@@ -69,4 +69,8 @@ macro_rules! wasm_bindgen_test_configure {
6969
#[path = "rt/mod.rs"]
7070
pub mod __rt;
7171

72+
// Make this only available to wasm32 so that we don't
73+
// import minicov on other archs.
74+
// That way you can use normal cargo test without minicov
75+
#[cfg(target_arch = "wasm32")]
7276
mod coverage;

0 commit comments

Comments
 (0)