Skip to content

Commit

Permalink
wasm
Browse files Browse the repository at this point in the history
  • Loading branch information
bmwill committed Feb 22, 2024
1 parent a55b37c commit d7a8d99
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,25 @@ jobs:

- name: Run tests
run: cargo test --all-features

wasm:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: rust version
run: |
rustc --version
cargo --version
- uses: taiki-e/install-action@wasm-pack

- name: Install clang
run: sudo apt-get install -y clang

- name: Run tests in wasm
env:
CC: clang
run: wasm-pack test --node
4 changes: 4 additions & 0 deletions src/types/address.rs
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,10 @@ impl std::error::Error for AddressParseError {}
mod test {
use super::*;


#[cfg(target_arch = "wasm32")]
use wasm_bindgen_test::wasm_bindgen_test as test;

#[test]
fn hex_parsing() {
let actual = Address::from_hex("0x2").unwrap();
Expand Down

0 comments on commit d7a8d99

Please sign in to comment.