Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
cleanup
  • Loading branch information
JReinhold committed Nov 19, 2025
commit 1cc6bbd1f9f2d67d7de0f26e5a4766dbccec79c2
9 changes: 5 additions & 4 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,12 @@ The `@storybook/mcp` package (in `packages/mcp`) is framework-agnostic:

**Testing:**

- **Unit tests**: `packages/mcp` has unit tests (Vitest with coverage)
- Run `pnpm test run --coverage` in mcp package
- **Unit tests**: Both `packages/mcp` and `packages/addon-mcp` have unit tests (Vitest with coverage)
- Run `pnpm test run --coverage` in individual package directories
- Run `pnpm test:run` at root to run all unit tests
- Prefer TDD when adding new tools
- **E2E tests**: `apps/internal-storybook/tests` contains E2E tests for the addon
- Run `pnpm test:e2e` at root or in internal-storybook
- Run `pnpm test` in `apps/internal-storybook` directory
- Tests verify MCP endpoint works with latest Storybook prereleases
- Uses inline snapshots for response validation
- **When to update E2E tests**:
Expand All @@ -102,7 +103,7 @@ The `@storybook/mcp` package (in `packages/mcp`) is framework-agnostic:
- Modifying tool responses or schemas (update tool-specific tests)
- Adding new toolsets or changing toolset behavior (update filtering tests)
- **Running tests**:
- `pnpm test:e2e` - run all E2E tests
- `pnpm test` in apps/internal-storybook - run E2E tests
- `pnpm vitest run -u` - update snapshots when responses change
- Tests start Storybook server automatically, wait for MCP endpoint, then run
- **Test structure**:
Expand Down
2 changes: 1 addition & 1 deletion vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export default defineConfig({
projects: ['packages/*', 'apps/*'],
coverage: {
include: ['**/src/**/*.{ts,tsx}'],
exclude: ['*.d.ts', 'eval/templates/project', 'eval/evals'],
exclude: ['*.d.ts', 'eval/templates/project/**', 'eval/evals/**'],
reporter: ['text', 'lcov', 'html'],
},
},
Expand Down