mirror of
https://github.com/penpot/penpot.git
synced 2025-05-24 14:06:12 +02:00
🎉 Enable conditional use of wasm module
This commit is contained in:
parent
cd6a739abb
commit
cc7ed497e8
9 changed files with 255 additions and 1 deletions
|
@ -18,10 +18,19 @@ pub fn print(msg: &str) {
|
|||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use wasm_bindgen_test::*;
|
||||
|
||||
wasm_bindgen_test_configure!(run_in_browser);
|
||||
|
||||
#[test]
|
||||
fn it_works() {
|
||||
let result = add(2, 2);
|
||||
assert_eq!(result, 4);
|
||||
}
|
||||
|
||||
#[wasm_bindgen_test]
|
||||
fn it_works_in_wasm() {
|
||||
let result = add(2, 2);
|
||||
assert_eq!(result, 4);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue