@starci/jest-preset 2.2.5 → 2.2.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,6 +1,11 @@
1
1
  # Changelog
2
2
 
3
- ## Unreleased
3
+ ## 2.2.6 - 2026-10-08
4
+
5
+ - Fixed: the `integration`, `e2e` and `contract` projects match `**/src/tests/<layer>/**/*.<layer>-spec.ts` instead of a pattern prefixed with the root path. On Windows a root that holds a dot-named folder (a checkout under `.claude`) turned the path separator before it into a glob escape, so the contract run found 0 spec files ("No tests found") although they exist.
6
+ - Fixed: `jest-util` is a declared devDependency of the package, which its own spec requires.
7
+
8
+ ## 2.2.5 (published before this release)
4
9
 
5
10
  - Breaking (contract change `coverage-modules-logic`): `starciJestConfig({ coverage: { roots, roles, excludes } })` takes the coverage scope the managed `be/jest.config.js` renders (`hfs sync`, from the `coverage` field of the slot manifest and `ruleParams.be.logicRoles`, through `scripts/hfs/coverage-scope.mjs`), and refuses to run without it. `COVERAGE_SOURCES` is deleted: per-file 100 now holds on every logic role (service, policy, projection, guard, mapper, client, filter, interceptor, processor, step, saga, saga-step, compensation, consumer, webhook) inside the measured roots (the logic of `be/src/modules`), never on `be/src/features` (thin by R203). New exports `rootGlob` and `StarciCoverageScope`; `collectCoverageFrom(coverage)` and `hasCoverageSubjects(root, glob)` take a scope and a glob with `**` and `{a,b}`.
6
11
  - New: `fakeInbox()` (also `@starci/jest-preset/inbox`), the twin of `recordingOutbox()` for the delivery side: `claim` answers true for the first call of a (source, eventId) pair and false afterwards, `release` gives the claim back, `seen` marks a redelivery, and `claims`, `claimed`, `released`, `failNext` and `clear` let a spec assert what a consumer or a signed webhook did. A spec no longer stubs `mock<Inbox>()` by hand.
package/index.cjs CHANGED
@@ -187,7 +187,8 @@ function starciJestConfig(options) {
187
187
  // Every spec file in a process of its own (never in band): nothing one file or the globalSetup put on a process global
188
188
  // (a framework registry such as @nestjs/graphql's type metadata) reaches another file. See world-runner.cjs.
189
189
  runner: WORLD_RUNNER,
190
- testMatch: [`<rootDir>/src/tests/${displayName}/**/*.${suffix}.ts`],
190
+ // A glob without the root's absolute path: jest's roots (src, apps) already bound the search, and a root path that holds a dot-named folder (a checkout under `.claude`) turns its backslash separator into a glob escape on Windows, so a path-prefixed pattern would match no file.
191
+ testMatch: [`**/src/tests/${displayName}/**/*.${suffix}.ts`],
191
192
  // The one test world: started once per run of a project that has a test to run, torn down after it.
192
193
  globalSetup: "<rootDir>/src/tests/world/global-setup.ts",
193
194
  globalTeardown: "<rootDir>/src/tests/world/global-teardown.ts",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@starci/jest-preset",
3
- "version": "2.2.5",
3
+ "version": "2.2.6",
4
4
  "description": "The StarCi jest config for Nest repositories (unit, integration, e2e and contract projects, ts-jest with diagnostics off, per-file 100 coverage of *.service.ts only) and the one shared unit-test double kit: typed mock<T>(), mockEntityManager(), fakeTransaction(), fakeCache(), fakeLock(), recordingEventBus(), recordingQueueOutbox(), fakeInbox(), FakeClock, fakeIds(), builder() and the Outcome matchers toBeRefused/toSucceedWith.",
5
5
  "license": "MIT",
6
6
  "private": false,
@@ -88,6 +88,7 @@
88
88
  "devDependencies": {
89
89
  "@types/jest": "29.5.14",
90
90
  "jest": "29.7.0",
91
+ "jest-util": "29.7.0",
91
92
  "ts-jest": "29.4.12",
92
93
  "typescript": "5.9.3"
93
94
  }