Skip to content

Commit 445bacc

Browse files
committed
Refine
1 parent 879b0c7 commit 445bacc

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

AGENTS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ Key invariants: `Segment.baselineText.slice(charStart, charEnd) === Token.surfac
9999

100100
## Testing
101101

102-
Jest with ts-jest, jsdom environment. PAPI is fully mocked in `__mocks__/`. Coverage is enforced at 100% on all `src/**` files (branches, functions, lines, statements).
102+
Jest with ts-jest, jsdom environment. PAPI is fully mocked in `__mocks__/`. Coverage is enforced at 100% on all `src/**` files (branches, functions, lines, statements), aside for select explicit exclusions.
103103

104104
`resetMocks: true` is set globally — mock implementations are cleared before every test, so each test must set up its own mocks (typically in `beforeEach`). Never rely on implementation state leaking from a prior test.
105105

jest.config.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,14 @@ const config: Config = {
2929
*/
3030
collectCoverage: false,
3131

32-
/** Collect coverage from all source files. Excludes type declarations, test files, and utils. */
32+
/** Collect coverage from all source files. Excludes tests, types, and select utils. */
3333
collectCoverageFrom: [
3434
'src/**/*.{ts,tsx}',
3535
'!src/**/*.d.ts',
3636
'!src/**/__tests__/**',
3737
'!src/**/*.test.{ts,tsx}',
3838
'!src/**/*.spec.{ts,tsx}',
39+
'!src/types/**',
3940
'!src/utils/interlinear-project-summary.ts',
4041
],
4142

@@ -54,7 +55,7 @@ const config: Config = {
5455
/** Ts-jest compiles TS to JS; V8 instruments it for coverage. */
5556
coverageProvider: 'v8',
5657

57-
/** Enforce 100% coverage on parsers, main, and web-view. */
58+
/** Enforce 100% coverage on parsers, main, and web-view (except where explicitly excluded). */
5859
coverageThreshold: {
5960
global: {
6061
branches: 100,

0 commit comments

Comments
 (0)