Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WASM: enable in-browser tests through wasm-bindgen-test #5646

Merged
merged 1 commit into from
Nov 13, 2024

Conversation

andiflabs
Copy link
Contributor

Summary

The unit tests currently are marked with both #[test] and #[wasm_bindgen_test]. This allows tests to run with both cargo test and wasm-pack test.

In theory, we could drop #[test], but given that cargo test is faster than wasm-pack test, this makes developing easier, so I'm keeping it for now.

Testing Plan

One or more of the following:

  • cd ironfish-rust-wasm && wasm-pack test --firefox --headless
  • cd ironfish-rust-wasm && wasm-pack test --chrome --headless
  • cd ironfish-rust-wasm && wasm-pack test --safari --headless

--headless is not required (it makes the output appear on the terminal instead of in the browser)

Documentation

N/A

Breaking Change

N/A

@andiflabs andiflabs requested a review from a team as a code owner November 13, 2024 01:50
@andiflabs andiflabs force-pushed the andrea/ironfish-rust-wasm-public-addr branch from f55f5f7 to ff4ba00 Compare November 13, 2024 02:03
@andiflabs andiflabs force-pushed the andrea/ironfish-rust-wasm-bindgen-tests branch from 19aeceb to c0d5cc7 Compare November 13, 2024 02:04
Base automatically changed from andrea/ironfish-rust-wasm-public-addr to staging November 13, 2024 21:58
The unit tests currently are marked with both `#[test]` and
`#[wasm_bindgen_test]`. This allows tests to run with both `cargo test`
and `wasm-pack test`.

In theory, we could drop `#[test]`, but given that `cargo test` is
faster than `wasm-pack test`, this makes developing easier, so I'm
keeping it for now.
@andiflabs andiflabs force-pushed the andrea/ironfish-rust-wasm-bindgen-tests branch from c0d5cc7 to 013cf4e Compare November 13, 2024 21:59
@andiflabs andiflabs enabled auto-merge (rebase) November 13, 2024 21:59
@andiflabs andiflabs merged commit 5cc13d7 into staging Nov 13, 2024
23 checks passed
@andiflabs andiflabs deleted the andrea/ironfish-rust-wasm-bindgen-tests branch November 13, 2024 22:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants