Skip to content

Run all tests in wasm except for credentials tests#123

Merged
JohanMabille merged 1 commit intomainfrom
wasm-tests
Mar 17, 2026
Merged

Run all tests in wasm except for credentials tests#123
JohanMabille merged 1 commit intomainfrom
wasm-tests

Conversation

@ianthomas23
Copy link
Member

@ianthomas23 ianthomas23 commented Mar 17, 2026

This PR ensures that all tests are run in WebAssembly except for the credentials tests, support for which will follow in another PR.

Summary of changes:

  1. Add the 4 test files not already covered (diff, fetch, push and tag).
  2. Add monkeypatched functions os.rename, os.symlink and Path.write_bytes.
  3. Rearrange the monkeypatched functions to satisfy linter.
  4. New test function strip_ansi_colours which removes ANSI colour sequences from a string. This is needed because by default the normal linux/macos tests do not include colour sequences but the wasm ones do, so tests that check the contents of stdout returned by git2cpp functions need to remove colour sequences that are added. In future I am intending that we have some tests with and some without colour sequences for both the normal and wasm tests.
  5. Remove passing env in subprocess.run as the commit_env_config fixture does this automatically.

@codecov
Copy link

codecov bot commented Mar 17, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.23%. Comparing base (1ed7644) to head (bbf967b).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #123   +/-   ##
=======================================
  Coverage   88.23%   88.23%           
=======================================
  Files          60       60           
  Lines        2619     2619           
  Branches      309      309           
=======================================
  Hits         2311     2311           
  Misses        308      308           

☔ 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ianthomas23
Copy link
Member Author

Results of manual WebAssembly test run:

================== 249 passed, 9 skipped in 435.51s (0:07:15) ==================

@JohanMabille JohanMabille merged commit c8109c6 into main Mar 17, 2026
8 checks passed
@JohanMabille JohanMabille deleted the wasm-tests branch March 17, 2026 13:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants