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(fix): failing unit test #3586

Merged
merged 1 commit into from
Jan 8, 2024
Merged

wasm(fix): failing unit test #3586

merged 1 commit into from
Jan 8, 2024

Conversation

TalDerei
Copy link
Collaborator

@TalDerei TalDerei commented Jan 7, 2024

Fixes breaking changes from #3527 and #3579

@TalDerei TalDerei self-assigned this Jan 7, 2024
@TalDerei TalDerei marked this pull request as ready for review January 7, 2024 01:09
@conorsch
Copy link
Contributor

conorsch commented Jan 8, 2024

How does one confirm or disprove that this change fixes the test? If I ran cargo test within crates/wasm/, I see all tests passing on both this branch and on main.

@TalDerei
Copy link
Collaborator Author

TalDerei commented Jan 8, 2024

How does one confirm or disprove that this change fixes the test? If I ran cargo test within crates/wasm/, I see all tests passing on both this branch and on main.

The wasm crate incorporates a unit testing suite that leverages wasm-bindgen-test to simulate a sample spend transaction. For testing purposes, the suite mocks indexDB database calls in an interactive browser accessible at http://127.0.0.1:8000. This requires executing wasm-pack test --chrome -- --test test_build --target wasm32-unknown-unknown --release --features "mock-database" rather than cargo test to check that particular test, and the transaction outputs are accessible in the browser's developer console. The serial and parallel transaction building were failing prior to these changes.

#3503 will eventually integrate this test, and I suspect a more expressive wasm unit testing suite, into the CI using the headless browser mode. That task is currently superseded by higher priority web work.

@TalDerei TalDerei requested a review from conorsch January 8, 2024 16:50
@conorsch
Copy link
Contributor

conorsch commented Jan 8, 2024

Nice, thanks for explaining, @TalDerei! I can now confirm that with the invocation you provided, tests fail on main, as expected, and pass on this branch.

@conorsch conorsch merged commit c8c7b41 into main Jan 8, 2024
7 checks passed
@conorsch conorsch deleted the fix-wasm-test branch January 8, 2024 17:07
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