I have a library crate to which I'm trying to add unit tests. The crate builds just fine using trunk and runs when used in a project, but when I try to build the tests (cargo build --tests --target wasm32-unknown-unknown) I get the following error:
--> C:\Users\jonas.vanderaa\.cargo\registry\src\index.crates.io-6f17d22bba15001f\ehttp-0.3.1\src\web.rs:34:22
|
34 | web_sys::console::error_1(&value);
| ^^^^^^^ could not find `console` in `web_sys`
I have a library crate to which I'm trying to add unit tests. The crate builds just fine using trunk and runs when used in a project, but when I try to build the tests (
cargo build --tests --target wasm32-unknown-unknown
) I get the following error:Any idea what's causing this?