A collection of configurations:
@acme/jest-config/jsdom
@acme/jest-config/node
Install the package into the consuming app/lib configuration.
If in a turborepo:
// package.json
{
"devDependencies": {
"@acme/jest-config": "*",
"jest": "^28.1.1",
"jest-environment-jsdom": "^28.1.1"
// ...
}
}
If NOT in a Turborepo:
yarn add -D jest jest-environment-jsdom @acme/jest-config
Use the package withing the consuming app/lib configuration.
// jest.config.js
module.exports = require('@acme/jest-config/jsdom');