File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -107,7 +107,9 @@ jobs:
107107 uses : step-security/harden-runner@e3f713f2d8f53843e71c69a996d56f51aa9adfb9 # v2.14.1
108108 with :
109109 egress-policy : audit
110-
110+ - name : Conditionally set env
111+ if : matrix.browser_flags != '--node' # if browser testing
112+ run : echo "WASM_BINDGEN_USE_BROWSER=1" >> $GITHUB_ENV
111113 - uses : actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
112114 with :
113115 persist-credentials : false
Original file line number Diff line number Diff line change 77//! cargo install wasm-pack
88//!
99//! # useful commands
10- //! wasm-pack test --headless --chrome
11- //! wasm-pack test --headless --firefox
10+ //! WASM_BINDGEN_USE_BROWSER=1 wasm-pack test --headless --chrome
11+ //! WASM_BINDGEN_USE_BROWSER=1 wasm-pack test --headless --firefox
1212//! wasm-pack test --node
1313//! ```
1414//!
15+ //! For testing within a browser, you will need the `WASM_BINDGEN_USE_BROWSER=1` env variable
16+ //!
1517
1618#![ cfg( target_arch = "wasm32" ) ]
1719
18- use wasm_bindgen_test:: * ;
19- wasm_bindgen_test_configure ! ( run_in_browser) ;
20+ use wasm_bindgen_test:: wasm_bindgen_test;
2021
2122mod aes_encryption;
2223
You can’t perform that action at this time.
0 commit comments