packages/jest/src/migrations/update-23-0-0/migrate-jest-configuration-skip-setup-file.md
skipSetupFile Generator Default to setupFileMigrates the previously deprecated skipSetupFile option of the @nx/jest:configuration generator. When set as a default in nx.json generators or per-project project.json generators, it is rewritten as follows:
skipSetupFile: true becomes setupFile: 'none' (preserving the original behavior of skipping the setup file). Existing setupFile values are left untouched.skipSetupFile: false is dropped (it was a no-op).Both flat (@nx/jest:configuration) and nested (@nx/jest → configuration) forms are handled.
Rewrite a nx.json generator default:
{
"generators": {
"@nx/jest:configuration": {
"skipSetupFile": true
}
}
}
{
"generators": {
"@nx/jest:configuration": {
"setupFile": "none"
}
}
}
Drop the option when set to false:
{
"generators": {
"@nx/jest:configuration": {
"skipSetupFile": false,
"testEnvironment": "jsdom"
}
}
}
{
"generators": {
"@nx/jest:configuration": {
"testEnvironment": "jsdom"
}
}
}
Rewrite a per-project generator default:
{
"generators": {
"@nx/jest:configuration": {
"skipSetupFile": true
}
}
}
{
"generators": {
"@nx/jest:configuration": {
"setupFile": "none"
}
}
}
The nested form (@nx/jest → configuration) is handled the same way.