Repository navigation
chore: add vitest smoke tests and run them in CI (BITS-207) - #21
Merged
Merged
Conversation
`npm test` runs vitest once (no watch) in jsdom. Smoke specs for D9Button (disabled and loading), D9Select (outside modelValue change) and D9Icon (brand icon, unknown name). The CI job runs `npm test` before the build. @vue/test-utils is pinned to 2.4.6: later 2.4.x and 2.5 need Vue 3.5, the repo runs Vue 3.3. The runtime tree (`npm ls --omit=dev`) and dist are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ows) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ert follows)" This reverts commit 1039334. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Apps register their own icons once BITS-206 lands, so the spec does the same instead of relying on D9's built-in list. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PhilReinking
marked this pull request as ready for review
October 11, 2026 14:53
PhilReinking
commented
Oct 11, 2026
PhilReinking
left a comment
Contributor
Author
There was a problem hiding this comment.
OK at a38379b, CI green.
Checked beyond the PR text: the specs pass merged with current main (3d0d1f8, with the BITS-195 Select change). Ten one-line breaks in Button, Select and Icon each fail a spec. Runtime deps, npm ls --omit=dev, the audit and the packed files match main, so Input gets nothing new. The specs type-check clean with vue-tsc, so adding them to check later is cheap.
|
|
||
| describe("D9Icon", () => { | ||
| it("renders a brand icon with the fab prefix", () => { | ||
| // Registered here like an app does, so the spec doesn't rely on D9's own icon list |
Contributor
Author
There was a problem hiding this comment.
Nit: today this library.add changes nothing. D9 already registers faGithub and brands is a snapshot, so the spec fails if faGithub leaves registerIcons.ts. It stops relying on D9's list once BITS-206 checks at render time.
Suggested change
| // Registered here like an app does, so the spec doesn't rely on D9's own icon list | |
| // Registered like an app does. Until BITS-206, D9's own list already has it. |
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.
Adds vitest with a few smoke specs and runs
npm testin the CI job, before the build. Fixes BITS-207tests/, outsidesrc, sovue-tscand the d.ts build skip them. They are not type-checked.@vue/test-utilsis pinned to 2.4.6: later versions need Vue 3.5, and the repo runs Vue 3.3.tests/Icon.spec.tsregistersfaGithubitself, like an app will after BITS-206. If BITS-206 changes D9Icon's behaviour, its PR updates this spec.magic-stringstays at 0.30.5, sonpm ls --omit=devmatches main. npm moved a few dev-only packages (glob, debug, ws) up.Tested: test, check, build, dist type check. The Button, Select and brand-icon specs fail when I break the line they guard.
distis byte-identical to main's.CI proof: red with a spec broken on purpose (1039334), green after the revert (d68a345).
Not tested: the Enter key. jsdom doesn't turn Enter into a click, so the loading spec clicks instead.
🤖 Generated with Claude Code