Skip to content

update: use xvfb and headful browser to execute unit tests for wasm32-unknown-unknown#346

Merged
slawlor merged 4 commits intoslawlor:mainfrom
Officeyutong:support-unittests-for-wasm
Apr 16, 2025
Merged

update: use xvfb and headful browser to execute unit tests for wasm32-unknown-unknown#346
slawlor merged 4 commits intoslawlor:mainfrom
Officeyutong:support-unittests-for-wasm

Conversation

@Officeyutong
Copy link
Copy Markdown
Contributor

This PR adds a test runner (.github/wasm-test-runner) to execute unit-tests for wasm32-unknown-unknown in browser, since headless tests execution by wasm-pack is broken.

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 16, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 80.62%. Comparing base (3e31d32) to head (5c717bc).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #346   +/-   ##
=======================================
  Coverage   80.62%   80.62%           
=======================================
  Files          66       66           
  Lines       13247    13247           
=======================================
  Hits        10680    10680           
  Misses       2567     2567           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Officeyutong Officeyutong marked this pull request as ready for review April 16, 2025 11:39
@Officeyutong Officeyutong force-pushed the support-unittests-for-wasm branch from 99c860f to e26f594 Compare April 16, 2025 12:13
@slawlor
Copy link
Copy Markdown
Owner

slawlor commented Apr 16, 2025

I'm not familiar with this framework at all, and it's not quite clear how the test output is being exported to the github signal.

If a test-case fails, I "think" it looks like index.js will throw an unhandled error and that should mark the signal as bad?

Can you by change run it with a specifically bad test and we can see what the GH signal looks like? Like break a test on purpose, push an update, and let's see what the signal looks like. Thanks!

@Officeyutong
Copy link
Copy Markdown
Contributor Author

Officeyutong commented Apr 16, 2025

I'm not familiar with this framework at all, and it's not quite clear how the test output is being exported to the github signal.

If a test-case fails, I "think" it looks like index.js will throw an unhandled error and that should mark the signal as bad?

Can you by change run it with a specifically bad test and we can see what the GH signal looks like? Like break a test on purpose, push an update, and let's see what the signal looks like. Thanks!

Yes, a failed test would cause index.js to throw an unhandled exception, making it exit with non-zero code, so the step in action will fail.
Here is the behavior of a failed test https://github.com/slawlor/ractor/actions/runs/14495716224/job/40662814600?pr=346

@slawlor
Copy link
Copy Markdown
Owner

slawlor commented Apr 16, 2025

Nice! please rebase the branch and we can get this merged.

@slawlor slawlor force-pushed the support-unittests-for-wasm branch from 29472f2 to 5c717bc Compare April 16, 2025 15:17
@slawlor slawlor merged commit 346f05a into slawlor:main Apr 16, 2025
19 checks passed
@slawlor slawlor mentioned this pull request Apr 16, 2025
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