Skip to content

tools: options in jest.config.js should be added on demand #18706

@layershifter

Description

@layershifter

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. */

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions