Skip to content

Commit

Permalink
✅(jest) Declare jest-jasmine2 by name not path
Browse files Browse the repository at this point in the history
Up-to-now when changing the test runner used internally by Jest, we were passing it the full path to the runner and its entry point. This approach proved fragile when we attempted to switch to Yarn in PnP mode.

This PR change the way we declare the runner: we stop passing the path to the entry point and just pass its name.

Satellite PR for #4368
  • Loading branch information
dubzzz committed Oct 24, 2023
1 parent 342638a commit cf268cc
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions packages/jest/test/jest-fast-check.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -633,11 +633,7 @@ async function writeToFile(
jestConfigPath,
`module.exports = { testMatch: ['<rootDir>/${specFileName}'], transform: {}, ${
options.testTimeoutConfig !== undefined ? `testTimeout: ${options.testTimeoutConfig},` : ''
}${
options.testRunner !== undefined
? `testRunner: '<rootDir>/../../../../node_modules/jest-jasmine2/build/index.js',`
: ''
} };`,
}${options.testRunner !== undefined ? `testRunner: 'jest-jasmine2',` : ''} };`,
),
]);

Expand Down

0 comments on commit cf268cc

Please sign in to comment.