Skip to content

test: migrate JavaScript unit and mutation tests to Vitest with isolated workers, V8 coverage, per-test mutation analysis, and supported Node.js release ranges. - #31

Merged
terabytesoftw merged 1 commit into
mainfrom
test/migrate-javascript-unit-and-mutation
Sep 3, 2026
Merged

test: migrate JavaScript unit and mutation tests to Vitest with isolated workers, V8 coverage, per-test mutation analysis, and supported Node.js release ranges.#31
terabytesoftw merged 1 commit into
mainfrom
test/migrate-javascript-unit-and-mutation

Conversation

@terabytesoftw

Copy link
Copy Markdown
Contributor

Pull Request

  • Breaking change (fix or feature that would cause existing functionality to change)
  • Bugfix (non-breaking change that fixes an issue)
  • CI/build configuration
  • Documentation update
  • New feature (non-breaking change that adds functionality)
  • Refactoring (no functional changes)

…ted workers, V8 coverage, per-test mutation analysis, and supported Node.js release ranges.
@terabytesoftw terabytesoftw added the bug Something isn't working label Sep 3, 2026
@codecov

codecov Bot commented Sep 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (07b8807) to head (617c55a).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@             Coverage Diff             @@
##                main       #31   +/-   ##
===========================================
  Coverage     100.00%   100.00%           
  Complexity      1745      1745           
===========================================
  Files            141       141           
  Lines           7053      7053           
===========================================
  Hits            7053      7053           

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

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@coderabbitai

coderabbitai Bot commented Sep 3, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Team

Run ID: f334b86d-81e9-4832-bfce-61407a347da4

📥 Commits

Reviewing files that changed from the base of the PR and between 07b8807 and 617c55a.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (27)
  • .gitattributes
  • CHANGELOG.md
  • package.json
  • resources/tests/clipboard.test.js
  • resources/tests/db.test.js
  • resources/tests/deep-links.test.js
  • resources/tests/dom.test.js
  • resources/tests/dropdown.test.js
  • resources/tests/features.test.js
  • resources/tests/history-cursor-default.test.js
  • resources/tests/history-cursor-no-rows.test.js
  • resources/tests/history-cursor-no-section.test.js
  • resources/tests/history-cursor.test.js
  • resources/tests/phpinfo-search-init.test.js
  • resources/tests/phpinfo-search.test.js
  • resources/tests/tabs.test.js
  • resources/tests/theme.test.js
  • resources/tests/toolbar-messaging-nofetch.test.js
  • resources/tests/toolbar-messaging.test.js
  • resources/tests/toolbar-runtime.test.js
  • resources/tests/toolbar-state.test.js
  • resources/tests/toolbar-theme.test.js
  • resources/tests/userswitch-guard.test.js
  • resources/tests/userswitch-row.test.js
  • resources/tests/userswitch.test.js
  • stryker.config.mjs
  • vitest.config.js

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.

📜 Recent review details
⏰ Context from checks skipped due to timeout. (4)
  • GitHub Check: phpunit / PHP 8.4-windows-2022
  • GitHub Check: mutation / PHP 8.5-ubuntu-latest
  • GitHub Check: Verify Vite build reproduces dist.
  • GitHub Check: mutation / PHP 8.5-ubuntu-latest
🔇 Additional comments (28)
resources/tests/tabs.test.js (1)

2-2: LGTM!

vitest.config.js (1)

1-26: LGTM!

package.json (1)

9-15: LGTM!

Also applies to: 33-48

stryker.config.mjs (1)

20-22: LGTM!

CHANGELOG.md (1)

37-37: LGTM!

.gitattributes (1)

50-50: LGTM!

resources/tests/clipboard.test.js (1)

2-2: LGTM!

resources/tests/db.test.js (1)

2-2: LGTM!

Also applies to: 251-271, 352-382

resources/tests/phpinfo-search-init.test.js (1)

2-2: LGTM!

resources/tests/phpinfo-search.test.js (1)

2-2: LGTM!

resources/tests/deep-links.test.js (1)

2-2: LGTM!

resources/tests/dom.test.js (1)

2-2: LGTM!

Also applies to: 200-204

resources/tests/dropdown.test.js (1)

2-2: LGTM!

resources/tests/features.test.js (1)

2-2: LGTM!

resources/tests/history-cursor-default.test.js (1)

2-2: LGTM!

resources/tests/history-cursor-no-rows.test.js (1)

2-2: LGTM!

resources/tests/history-cursor-no-section.test.js (1)

2-2: LGTM!

resources/tests/toolbar-messaging-nofetch.test.js (1)

2-2: LGTM!

resources/tests/history-cursor.test.js (1)

2-2: LGTM!

resources/tests/theme.test.js (1)

2-2: LGTM!

resources/tests/toolbar-messaging.test.js (2)

2-2: LGTM!


241-247: LGTM!

resources/tests/toolbar-runtime.test.js (1)

2-2: LGTM!

resources/tests/toolbar-state.test.js (1)

2-2: LGTM!

resources/tests/toolbar-theme.test.js (1)

2-2: LGTM!

resources/tests/userswitch-guard.test.js (1)

2-2: LGTM!

resources/tests/userswitch-row.test.js (1)

2-2: LGTM!

resources/tests/userswitch.test.js (1)

2-2: LGTM!


📝 Summary

Summary by CodeRabbit

  • Tests

    • Migrated JavaScript unit tests to Vitest.
    • Added isolated test execution and V8 coverage reporting.
    • Expanded coverage for edge cases involving detached elements, cancelled tasks, orphaned markers, and request tracking.
    • Added mutation-testing support through Vitest.
  • Changelog

    • Documented the updated testing workflow and supported Node.js release ranges.
  • Chores

    • Updated project scripts and tooling configuration for the new test framework.
    • Removed the previous coverage tool configuration.

Walkthrough

The project migrates JavaScript unit and mutation testing to Vitest. It adds isolated worker execution, V8 coverage, updated Node.js support, Vitest dependencies, and tests for additional DOM and request edge cases.

Changes

Vitest migration

Layer / File(s) Summary
Vitest tooling and configuration
.gitattributes, CHANGELOG.md, package.json, stryker.config.mjs, vitest.config.js
Vitest replaces Node’s test runner and c8 for unit, coverage, and mutation testing. The configuration enables isolated workers and V8 coverage thresholds.
Test runner import migration
resources/tests/*.test.js
Test files import test from Vitest instead of node:test.
Edge-case test coverage
resources/tests/db.test.js, resources/tests/dom.test.js, resources/tests/toolbar-messaging.test.js
Tests cover orphan markers, cancelled or detached toggles, settled requests, and skipped toolbar XHR tracking.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Merge Risk: ⚪ Minimal · up to 617c5

This change migrates JavaScript testing, coverage, and mutation-test tooling to Vitest while preserving the tested application behavior. No current merge-readiness risk remains.

Poem

A rabbit runs tests through a bright Vitest gate
Isolated workers keep each task in its state
V8 counts coverage, neat as a chart
Edge cases hop in and do their part
Mutation checks follow with ears held high

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 24 files. (3 skipped: 3… Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: migration of JavaScript unit and mutation tests to Vitest, including isolated workers, V8 coverage, and Node.js support updates. It is detailed but rem…
Description check ✅ Passed The description classifies the pull request as a refactoring with no functional changes, which matches the testing-tool migration described in the changeset.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title accurately summarizes the main change: migration of JavaScript unit and mutation tests to Vitest, including isolated workers, V8 coverage, and Node.js support updates. It is detailed but remains clear and related.

Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 24 files. (3 skipped: 3 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch test/migrate-javascript-unit-and-mutation

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@terabytesoftw
terabytesoftw merged commit 78cf264 into main Sep 3, 2026
43 checks passed
@terabytesoftw
terabytesoftw deleted the test/migrate-javascript-unit-and-mutation branch September 3, 2026 10:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant