diff --git a/jest.config.mjs b/jest.config.mjs index 7c83ce15d659..36026682bdb1 100644 --- a/jest.config.mjs +++ b/jest.config.mjs @@ -33,21 +33,39 @@ if (!isProduction) { } const config = { + projects: [ + { + displayName: "Format Test", + testMatch: ["/tests/format/**/jsfmt.spec.js"], + runner: "jest-light-runner", + }, + { + displayName: "Unit Test", + testMatch: ["/tests/unit/**/*.js"], + runner: "jest-light-runner", + }, + { + displayName: "Integration Test", + testMatch: ["/tests/integration/__tests__/**/*.js"], + runner: "jest-light-runner/in-band", + }, + ].map((projectConfig) => ({ + ...projectConfig, + snapshotSerializers: [ + "jest-snapshot-serializer-raw", + "jest-snapshot-serializer-ansi", + ], + snapshotFormat: { + escapeString: false, + printBasicPrototype: false, + }, + testPathIgnorePatterns, + })), setupFiles: [ "/tests/config/format-test-setup.js", "/tests/integration/integration-test-setup.js", ], - runner: "jest-light-runner", - snapshotSerializers: [ - "jest-snapshot-serializer-raw", - "jest-snapshot-serializer-ansi", - ], - testMatch: [ - "/tests/format/**/jsfmt.spec.js", - "/tests/integration/__tests__/**/*.js", - "/tests/unit/**/*.js", - ], - testPathIgnorePatterns, + testMatch: [], collectCoverage: ENABLE_CODE_COVERAGE, collectCoverageFrom: ["/src/**/*.js", "/bin/**/*.js"], coveragePathIgnorePatterns: [ diff --git a/package.json b/package.json index 9f96ff4b1de1..d1f2cfbe8678 100644 --- a/package.json +++ b/package.json @@ -126,7 +126,7 @@ "esm-utils": "4.1.0", "execa": "6.1.0", "jest": "29.0.1", - "jest-light-runner": "0.4.0", + "jest-light-runner": "fisker/jest-light-runner#in-band-runner", "jest-snapshot-serializer-ansi": "1.0.0", "jest-snapshot-serializer-raw": "1.2.0", "jest-watch-typeahead": "2.1.1", diff --git a/yarn.lock b/yarn.lock index 9eeabed07ad0..a1fb8b184321 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5197,9 +5197,9 @@ __metadata: languageName: node linkType: hard -"jest-light-runner@npm:0.4.0": +"jest-light-runner@fisker/jest-light-runner#in-band-runner": version: 0.4.0 - resolution: "jest-light-runner@npm:0.4.0" + resolution: "jest-light-runner@https://github.com/fisker/jest-light-runner.git#commit=8f8bec4a2318036992c2c2ef5304688f0f72d937" dependencies: "@jest/expect": ^29.0.1 jest-circus: ^29.0.1 @@ -5210,7 +5210,7 @@ __metadata: supports-color: ^9.2.1 peerDependencies: jest: ^27.5.0 || ^28.0.0 || ^29.0.0 - checksum: 8ad449a830bd1b039d505baa40881e6e7d1badc8698d844c456c156f820bf0a4b58563ef07678dbed368ca968262bccd28ba756a3d4dc1a8e19f49a57bf82775 + checksum: 7753d49b331e81d9c0a6aee50627f4aa79193aea5a15f1d48eeb5e2374b84b1607f5d3e3bb2ad39511d7c8723d80ce03d84e37b49ea05623d137e08eba0339ae languageName: node linkType: hard @@ -7000,7 +7000,7 @@ __metadata: import-meta-resolve: 2.1.0 jest: 29.0.1 jest-docblock: 29.0.0 - jest-light-runner: 0.4.0 + jest-light-runner: "fisker/jest-light-runner#in-band-runner" jest-snapshot-serializer-ansi: 1.0.0 jest-snapshot-serializer-raw: 1.2.0 jest-watch-typeahead: 2.1.1