@starci/jest-preset 2.2.2 → 2.2.3

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.
Files changed (3) hide show
  1. package/README.md +1 -1
  2. package/index.cjs +1 -1
  3. package/package.json +3 -3
package/README.md CHANGED
@@ -34,7 +34,7 @@ module.exports = require("@starci/jest-preset").starciJestConfig()
34
34
  `typeof Dep !== "undefined" ? Dep : Object` guard per class-typed constructor parameter, and inlined decorator helpers carry branches
35
35
  of their own, so 100 would be unreachable. The repository lists `tslib` in its devDependencies (`UNIT_COMPILER_OPTIONS`). Reporters are `text-summary`,
36
36
  `text` and `lcov`: the run writes `coverage/lcov.info` under the repository (be/) root.
37
- - **Sonar and Codecov import that lcov, scoped to the services.** `hfs sync` renders `sonar.coverage.inclusions` and the `codecov.yml`
37
+ - **Sonar and Codecov import that lcov, scoped to the services.** `hfs sync` renders `sonar.coverage.exclusions` (the complement of the services: SonarQube has no coverage inclusions) and the `codecov.yml`
38
38
  status paths from `COVERAGE_SOURCES` on the be side (`be/src/**/*.service.ts`), so jest, Sonar and Codecov measure the same files;
39
39
  the Sonar gate holds coverage at 100 overall, on new code and per file. `sonarExclusions()` still renders `sonar.exclusions`
40
40
  (`**/*.spec.ts,**/*.e2e-spec.ts,**/dist/**,**/coverage/**`). There is no coverage exclusion list.
package/index.cjs CHANGED
@@ -14,7 +14,7 @@ const { fakeIds, FakeIds } = require("./ids.cjs")
14
14
  * resolvers, controllers and consumers are thin, and helpers called by a service are covered through the service's own
15
15
  * spec, so every `*.service.ts` under `src` is the whole denominator and every file in it must reach 100 on every metric.
16
16
  * The unit run also writes `coverage/lcov.info`: Sonar imports it (`sonar.javascript.lcov.reportPaths`) with the same scope
17
- * (`sonar.coverage.inclusions=be/src/**\/*.service.ts`) and its quality gate holds coverage at 100 on those files.
17
+ * (`sonar.coverage.exclusions` holds every other file, rendered by hfs sync) and its quality gate holds coverage at 100 on those files.
18
18
  */
19
19
  const COVERAGE_SOURCES = ["src/**/*.service.ts"]
20
20
  const COVERAGE_EXCLUDES = ["src/tests/**", "**/dist/**", "**/coverage/**"]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@starci/jest-preset",
3
- "version": "2.2.2",
3
+ "version": "2.2.3",
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(), recordingOutbox(), FakeClock, fakeIds(), builder() and the Outcome matchers toBeRefused/toSucceedWith.",
5
5
  "license": "UNLICENSED",
6
6
  "private": false,
@@ -51,7 +51,7 @@
51
51
  "files": [
52
52
  "*.cjs",
53
53
  "*.d.ts",
54
- "!*.test.*",
54
+ "!*.spec.*",
55
55
  "README.md",
56
56
  "CHANGELOG.md"
57
57
  ],
@@ -66,7 +66,7 @@
66
66
  "@jest/globals": ">=29"
67
67
  },
68
68
  "scripts": {
69
- "test": "node --test \"*.test.mjs\""
69
+ "test": "node --test \"*.spec.mjs\""
70
70
  },
71
71
  "peerDependenciesMeta": {
72
72
  "typeorm": {