chore(internals): cover playground browser open branches - #373
Merged
Merged
Conversation
|
Important Review skippedBot user detected. To trigger a single review, invoke the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
Code Coverage OverviewLanguages: TypeScript TypeScript / code-coverage/vitestThe overall line coverage in commit ef6c27e in the Show a line coverage summary of the most impacted files.
Updated |
coryrylan
approved these changes
Oct 5, 2026
Adds unit tests that call PlaygroundService.create for the mcp and cli environments while CI is unset, and assert that the open package receives the returned playground URL. Line coverage for service.ts moves from 92% to 100%, and branch coverage moves from 85.71% to 100%. No behavior change. Signed-off-by: Cursor Agent <cursoragent@cursor.com>
coryrylan
force-pushed
the
topic/upkeep/coverage/playground-browser-open
branch
from
October 5, 2026 11:55
8a1883e to
ef6c27e
Compare
coryrylan
enabled auto-merge (rebase)
October 5, 2026 11:55
Collaborator
|
🎉 This issue has been resolved in version 2.12.0 🎉 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Selected task
Coverage for
projects/internals/tools/src/playground/service.ts.Selector rationale: "2 uncovered lines, 92% lines and 85.71% branches, the smallest gap below the 90% threshold."
Measurement
PlaygroundService.createopens the system browser whenCIis unset andELEMENTS_ENVismcporcli. The new tests callcreatein both environments withCIremoved and assert thatopenreceives the returned URL. Theopenmodule is mocked so the suite does not launch a browser.Public API
No public API changed.
Left alone
Validation failures, formatted playground names, and the existing path that skips the browser when
CIis set were already covered.projects/internals/toolshas noDEVELOPMENT.md. It defineslint,test, andtest:coverage. It does not definetest:types,test:axe,test:ssr,test:lighthouse, ortest:visual.Validation
pnpm run lintinprojects/internals/tools: passpnpm run test:coverageinprojects/internals/tools: 763 tests passCI=true pnpm run ci: passgit diff --check: cleanpnpm run test(coverage disabled) fails on unmodifiedmainas well. The node test config isolates modules only when coverage is enabled, so incompletenode:fsmocks leak across files. Package CI runstest:coverage, which passes.