Skip to content

[Routine - QP] test: ignore local Claude worktrees in Jest#45

Draft
winterdrive wants to merge 1 commit into
masterfrom
chore/ignore-claude-worktrees-jest
Draft

[Routine - QP] test: ignore local Claude worktrees in Jest#45
winterdrive wants to merge 1 commit into
masterfrom
chore/ignore-claude-worktrees-jest

Conversation

@winterdrive

Copy link
Copy Markdown
Owner

變更摘要

  • 讓 Jest 忽略本機 .claude/** 路徑,避免 local worktree 裡的 src/test/**/*.test.tsnpm test 一起掃進來。
  • 同步把 .claude 加到 modulePathIgnorePatterns,避免 module crawler 解析殘留 worktree 的 mock/module。

背景

本機曾殘留多個 .claude/worktrees/*,其中包含 src/test/unit/*.test.ts。目前 jest.config.jstestMatch**/src/test/**/*.test.ts,因此 open 或 stale worktree 會污染 npm test 的測試集合。

已處理的本地清理

驗證

  • npx jest --listTests --runInBand | Select-String -Pattern "\.claude\\worktrees|\.claude/worktrees" | Measure-Object -> Count: 0
  • npm test -> 7 suites / 107 tests passed
  • npx tsc -p ./
  • git diff --check

備註

  • 這是 routine test hygiene PR,不包含 version bump / CHANGELOG / release-ready

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant