From aafd02ae8dd8aefadf871a567c2a27cef0ea5a73 Mon Sep 17 00:00:00 2001 From: Samuel Onoja Date: Sat, 9 Sep 2023 18:59:12 +0100 Subject: [PATCH 1/2] Running WASM tests with Cargo --- docs/DEV_ENVIRONMENT.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/docs/DEV_ENVIRONMENT.md b/docs/DEV_ENVIRONMENT.md index 317bb4eb2c..21fc082908 100644 --- a/docs/DEV_ENVIRONMENT.md +++ b/docs/DEV_ENVIRONMENT.md @@ -52,7 +52,7 @@ export BOB_PASSPHRASE="also shoot benefit prefer juice shell elder veteran woman mimic image kidney" export ALICE_PASSPHRASE="spice describe gravity federal blast come thank unfair canal monkey style afraid" ``` -6. Run WASM tests +5. Run WASM tests - for Linux users: ``` wasm-pack test --firefox --headless mm2src/mm2_main @@ -66,5 +66,16 @@ CC=/opt/homebrew/opt/llvm/bin/clang AR=/opt/homebrew/opt/llvm/bin/llvm-ar wasm-pack test --firefox --headless mm2src/mm2_main ``` Please note `CC` and `AR` must be specified in the same line as `wasm-pack test mm2src/mm2_main`. +#### Running WASM tests with Cargo
+ - Install `wasm-bindgen-cli`:
+ Make sure you have wasm-bindgen-cli installed with a version that matches the one specified in your Cargo.toml file. + You can install it using Cargo with the following command: + ``` + cargo install -f wasm-bindgen-cli --version + ``` + - Run + ``` + cargo test --target wasm32-unknown-unknown --package coins --lib utxo::utxo_block_header_storage::wasm::indexeddb_block_header_storage + ``` PS If you notice that this guide is outdated, please submit a PR. From 505bf9ef899e9ab70b063353d333bc1969e0168e Mon Sep 17 00:00:00 2001 From: Samuel Onoja Date: Sun, 10 Sep 2023 17:16:30 +0100 Subject: [PATCH 2/2] update title --- docs/DEV_ENVIRONMENT.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/DEV_ENVIRONMENT.md b/docs/DEV_ENVIRONMENT.md index 21fc082908..7ac571def2 100644 --- a/docs/DEV_ENVIRONMENT.md +++ b/docs/DEV_ENVIRONMENT.md @@ -66,7 +66,7 @@ CC=/opt/homebrew/opt/llvm/bin/clang AR=/opt/homebrew/opt/llvm/bin/llvm-ar wasm-pack test --firefox --headless mm2src/mm2_main ``` Please note `CC` and `AR` must be specified in the same line as `wasm-pack test mm2src/mm2_main`. -#### Running WASM tests with Cargo
+#### Running specific WASM tests with Cargo
- Install `wasm-bindgen-cli`:
Make sure you have wasm-bindgen-cli installed with a version that matches the one specified in your Cargo.toml file. You can install it using Cargo with the following command: