Currently migrate-converged-pkg adds snapshotSerializers & setupFilesAfterEnv to jest.config.js:
|
setupFilesAfterEnv: ['./config/tests.js'], |
|
snapshotSerializers: ['@fluentui/jest-serializer-make-styles'], |
As was discovered in #18673 these options may be redundant for some packages.
snapshotSerializers
This option should be added only if @fluentui/react-make-styles is present in package.json#dependencies.
setupFilesAfterEnv
This option should be added always. If ./config/tests.js is missing it should be created with following content:
/** Jest test setup file. */
Currently
migrate-converged-pkgaddssnapshotSerializers&setupFilesAfterEnvtojest.config.js:fluentui/tools/generators/migrate-converged-pkg/index.ts
Lines 132 to 133 in 8e98ad3
As was discovered in #18673 these options may be redundant for some packages.
snapshotSerializersThis option should be added only if
@fluentui/react-make-stylesis present inpackage.json#dependencies.setupFilesAfterEnvThis option should be added always. If
./config/tests.jsis missing it should be created with following content:/** Jest test setup file. */