Skip to content
This repository has been archived by the owner on Oct 25, 2022. It is now read-only.

Commit

Permalink
chore: integrating wasm-bindgen-test and run headless tests in GitHub…
Browse files Browse the repository at this point in the history
… action #72
  • Loading branch information
polarbeargo committed Nov 9, 2021
1 parent 2c0bc0a commit 640d2af
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,13 @@ jobs:
with:
command: check

- name: Install
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh

- run: cargo test
- run: wasm-pack test --headless --chrome protocol/test-serialization/
- run: wasm-pack test --headless --firefox protocol/test-serialization/

test:
name: Test Suite
runs-on: ubuntu-latest
Expand Down
5 changes: 4 additions & 1 deletion protocol/test-serialization/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,7 @@ bs58 = { version = "0.4", features = ["check"] }
chrono = "0.4"
serde = { version = "1", features = ["derive"] }
pretty_assertions = "1"
wasm-bindgen-test = "0.3.0"
wasm-bindgen-test = "0.3.0"

[lib]
crate-type = ["cdylib", "rlib"]
7 changes: 5 additions & 2 deletions protocol/test-serialization/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,14 @@
mod test_3NKaBJsN1SehD6iJwRwJSFmVzJg5DXSUQVgnMxtH4eer4aF5BrDK;

#[cfg(test)]
mod tests {
pub mod tests {
use super::{block_path_test, block_path_test_batch};
use bin_prot::{from_reader, to_writer, Value};
use mina_crypto::hash::*;
use wasm_bindgen_test::*;
use wasm_bindgen_test::*;
// commenting the following 2 line to run in local
use wasm_bindgen_test::wasm_bindgen_test_configure;
wasm_bindgen_test_configure!(run_in_browser);
use mina_crypto::signature::{
FieldPoint, InnerCurveScalar, PublicKey, PublicKey2, PublicKey3, Signature,
};
Expand Down

0 comments on commit 640d2af

Please sign in to comment.