You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Run the @comark/svelte browser tests (client Vitest project, 77 tests) in CI, and fix the one that broke on main while they were skipped.
Why
packages/comark-svelte/vitest.config.ts dropped the client project whenever CI or GITHUB_ACTIONS was set. The guard came in with the package split (#34). Chromium was added to CI the same day (#54), but the guard stayed, so CI ran only the 69 server tests. @comark/react has no such guard and runs its browser tests in CI.
While they were skipped, #611 broke one of them. Default slot content next to named slots is now unwrapped, so getByText('Default slot content.') no longer matches an element. #611 updated the matching server test but missed this one.
Removed the isCI guard so the client project always runs in Chromium.
The named-slot browser test now checks the card's text and that no <p> wraps the default slot. This matches the server test ('</h3> Default slot content. <footer>').
Evidence
CI=true GITHUB_ACTIONS=true pnpm vitest run in packages/comark-svelte, with the guard removed and the old assertion:
The bundle size check fails locally on comark (458k against a 457k snapshot). The latest main CI run fails the same way, so it's unrelated to this PR.
ELI5
Some of the Svelte tests only ran on developers' machines and were turned off on the build server, so one of them broke and nobody noticed. This turns them back on everywhere and fixes the broken one to expect the new, correct output.
🤖 Generated with Amp, reviewed by @larbish before opening.
Summary by CodeRabbit
Tests
Client-side tests now use a consistent browser configuration in CI and local environments.
Named-slot coverage verifies that a card displays its title, default content, and footer content together without rendering an extra paragraph.
No actionable comments were generated in the recent review.
Walkthrough
The Vitest client project is now configured in all environments. The CardWithFooter test checks the combined title, default-slot, and footer content, and asserts that no paragraph element is rendered.
Changes: Named-slot rendering
Layer / File(s)
Summary
Configure and assert named-slot rendering packages/comark-svelte/vitest.config.ts, packages/comark-svelte/test/MarkdownNode.svelte.test.ts
The client project is included in every environment, and the project list no longer filters falsey entries. The CardWithFooter test checks the combined card text and confirms that no paragraph element is rendered.
comarkdown/comark#611: Changes default-slot auto-unwrapping next to named slots and updates a related Svelte slot test.
Merge Risk: Minimal · up to d882c
This change enables the browser tests in CI and adjusts one test assertion to match the current rendered output. It does not alter runtime package behavior, and no merge-blocking risk was identified.
Pre-merge checks: 4
Check name
Status
Explanation
Description Check
Check skipped - CodeRabbit’s high-level summary is enabled.
Title check
The title "test(svelte): run browser tests in ci" matches the main change. The PR removes the CI guard in vitest.config.ts so the Svelte client Vitest project runs in Chromium during CI. It also updat…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title "test(svelte): run browser tests in ci" matches the main change. The PR removes the CI guard in vitest.config.ts so the Svelte client Vitest project runs in Chromium during CI. It also updates the named-slot browser test that no longer matches the rendered output. The title is specific and short, and it names the affected package.
Finishing Touches
Generate unit tests (beta)
Commit to this branch
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
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.
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.
System calls cannot be simulated consistently and are left out of the measure. The reported value understates the real cost. Switch to the Walltime instrument to measure them.
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
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.
What
Run the
@comark/sveltebrowser tests (clientVitest project, 77 tests) in CI, and fix the one that broke onmainwhile they were skipped.Why
packages/comark-svelte/vitest.config.tsdropped theclientproject wheneverCIorGITHUB_ACTIONSwas set. The guard came in with the package split (#34). Chromium was added to CI the same day (#54), but the guard stayed, so CI ran only the 69 server tests.@comark/reacthas no such guard and runs its browser tests in CI.While they were skipped, #611 broke one of them. Default slot content next to named slots is now unwrapped, so
getByText('Default slot content.')no longer matches an element. #611 updated the matching server test but missed this one.isCIguard so theclientproject always runs in Chromium.<p>wraps the default slot. This matches the server test ('</h3> Default slot content. <footer>').Evidence
CI=true GITHUB_ACTIONS=true pnpm vitest runinpackages/comark-svelte, with the guard removed and the old assertion:With the fixed assertion:
Notes
The bundle size check fails locally on
comark(458k against a 457k snapshot). The latestmainCI run fails the same way, so it's unrelated to this PR.ELI5
Some of the Svelte tests only ran on developers' machines and were turned off on the build server, so one of them broke and nobody noticed. This turns them back on everywhere and fixes the broken one to expect the new, correct output.
🤖 Generated with Amp, reviewed by @larbish before opening.
Summary by CodeRabbit