Repository navigation
Conversation
title.macro hasn't been imported since the Storybook 8 move, which relies on auto-titles. Also drop babel-plugin-macros and the unused @testing-library/react-hooks and react-test-renderer. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Story tests pass unpinned and pinned to month-, year-, and leap-day edges. Unpinned, a11y checks also cover the "today" cell. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Move every test out of __tests__/tests folders and split codemods' lib.test.ts per module. Still runs on Jest; keep tests out of builds, coverage, and npm. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Add jsdom and node Vitest projects alongside storybook, port every non-story test from Jest (and agent-tools from node:test), and run them all from one vitest:test Nx target. Jest stays installed until the next PR. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Delete the Jest configs, preset, script/jest, and the nx target default. Drop the Jest packages; add jsdom directly for Vitest. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
babel-jest was their last reader; tsdown, Storybook (SWC), and SVGR (configFile: false) never load them. Build output is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Covers play vs unit test, co-located files, canvas vs screen, play conventions, and migrating unit tests into stories. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@skillsoft/eslint-plugin-gamut
@skillsoft/gamut
@skillsoft/gamut-agent-tools
@skillsoft/gamut-codemods
@skillsoft/gamut-icons
@skillsoft/gamut-illustrations
@skillsoft/gamut-patterns
@skillsoft/gamut-styles
@skillsoft/gamut-tests
@skillsoft/variance
commit: |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #84 +/- ##
=======================================
Coverage ? 77.20%
=======================================
Files ? 464
Lines ? 32091
Branches ? 1328
=======================================
Hits ? 24776
Misses ? 7315
Partials ? 0
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This branch has not been deployed
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.
Overview
Adds a repo-local agent skill,
.claude/skills/gamut-repo-testing, that writes down how tests are written inside skillsoft-gamut now that stories run as tests and Jest is gone. Until now these conventions lived only in review comments and in individual people's agent setups, so agents working in the repo kept getting them wrong: queries throughscreenfor inline elements, tests in__tests__/, overlays opened withisOpen: truein args, behavioral cases dropped while migrating a unit test.This is based on #81 (Jest removal), because the skill documents the Vitest setup from that PR. Retarget to
mainafter #81 merges.Why a new repo-local skill instead of editing
gamut-testingpackages/gamut-agent-tools/skills/gamut-testingships to apps that consume Gamut throughgamut plugin install. Its readers are app teams using@skillsoft/gamut-tests, and most of this skill doesn't apply to them: relative imports and theimport-pathslint rule, the Docs page stacking overlays,globals: { direction }from our Storybook preview, the lib-build exclude for stories. So the shipped skill is unchanged, and the new one sits next togamut-writingandgamut-create-skill. It links togamut-testingforsetupRtland harness details instead of repeating them.What the skill covers
playor unit test: a table of what goes where. Anything a user can see or do (content, accessible names, interactions, overlays, focus, geometry, RTL) goes in a storyplay. Ref forwarding, imperative handles, hooks and pure logic go in a unit test. Style assertions are dropped. Also covers how many stories to write (about 3–7 per component, related flows grouped in oneplay).it(), port every behavioral case, name any style assertion that's dropped, and map eachit()to its new home before deleting the old test.<Component>.test.tsxand<Component>.stories.tsx, never in__tests__/. Relative imports,~storybook/*for argTypes and blocks, story helpers kept inside the stories file, and thetsconfig.lib.jsonandmain.tssetup a package needs before its first story.getBy*, absence withtoBeNull().playconventions:canvasby default andscreenonly for portaled overlays; imports fromstorybook/test; aplaywithoutawaitisn'tasync; overlays open from a trigger button; a storyplayreplaces the metaplay; spy counts are checked right after the action that fires them; file order; inline namedrenderfunctions; JSX children throughrender; and when to addargTypes.setupRtlexample usingvi.fn()and explicit imports fromvitest, since globals are off.--project=jsdomornode), watch mode, and lint, all from the repo root on Node 22.22.2. It also explains that unit tests load sibling packages from their builtdist, so a filteredyarn vitest runneeds a build first after editing a package another one imports.Notes for reviewers
.claude/skills/gamut-repo-testing/changes, so there's no changeset.Dialog.stories.tsx,Popover.stories.tsxandDialog.test.tsx. If a rule here doesn't match how you write tests, comment on it. Agents follow this skill as written.PR Checklist
Testing Instructions
.claude/skills/gamut-repo-testing/SKILL.mdand check the rules against how you write tests.yarn vitest run --project=jsdom packages/gamut/src/Modals/Dialog.test.tsxand confirm both tests pass. This checks the unit-test command in the skill.yarn test:stories Dialogand confirm the Dialog stories pass.playfor a component. Confirm it picks upgamut-repo-testingand follows it (for example, it usescanvasfor inline elements andscreenfor overlays).PR Links and Envs
🤖 Generated with Claude Code