Skip to content

Commit c064ca8

Browse files
committed
Update claude.md
1 parent e7914cc commit c064ca8

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

CLAUDE.md

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,30 @@ You are a **Principal Software Engineer** responsible for:
1515

1616
### Development Commands
1717
- **Build**: `npm run build` (alias for `npm run build:dist`)
18-
- **Build source**: `npm run build:dist:src`
18+
- **Build source**: `npm run build:dist:src` or `pnpm build:dist:src`
1919
- **Build types**: `npm run build:dist:types`
2020
- **Test**: `npm run test` (runs check + all tests)
21-
- **Test unit only**: `npm run test:unit`
21+
- **Test unit only**: `npm run test:unit` or `pnpm test:unit`
22+
- **Test specific file**: `pnpm run test:unit -- path/to/test.mts`
23+
- **Test with pattern**: `pnpm run test:unit -- path/to/test.mts -t "test name pattern"`
2224
- **Test with coverage**: `npm run test:unit:coverage`
23-
- **Update test snapshots**: `npm run testu` (builds, then updates snapshots)
25+
- **Update test snapshots**: `npm run testu` or `pnpm testu` (builds, then updates snapshots)
26+
- **Update snapshots for specific file**: `pnpm run testu -- path/to/test.mts`
2427
- **Lint**: `npm run check:lint` (uses eslint)
2528
- **Type check**: `npm run check:tsc` (uses tsgo)
2629
- **Check all**: `npm run check` (lint + typecheck)
2730
- **Fix linting**: `npm run lint:fix`
2831
- **Commit without tests**: `git commit --no-verify` (skips pre-commit hooks including tests)
2932

33+
### Testing Best Practices
34+
- **Always build before testing**: Run `pnpm build:dist:src` before running tests to ensure dist files are up to date
35+
- **Test single files**: `pnpm run test:unit src/commands/specific/cmd-file.test.mts` (no `--` needed)
36+
- **Test with pattern**: `pnpm run test:unit src/commands/specific/cmd-file.test.mts -t "pattern"`
37+
- **Update snapshots**:
38+
- All tests: `pnpm testu` (builds first, then updates all snapshots)
39+
- Single file: `pnpm run test:unit src/commands/specific/cmd-file.test.mts --update`
40+
- **Timeout for long tests**: Some tests may need longer timeouts, which can be specified in the test file
41+
3042
### Git Commit Guidelines
3143
- **🚨 FORBIDDEN**: NEVER add Claude co-authorship or Claude signatures to commits
3244
- **🚨 FORBIDDEN**: Do NOT include "Generated with Claude Code" or similar AI attribution in commit messages

0 commit comments

Comments
 (0)