Skip to content

Support transforming all modules which can be specified in config #8810

Open
@Mark1626

Description

@Mark1626

🚀 Feature Proposal

Currently transform only converts tests files and some of the configurable modules, allows all modules which can be configured to be transformed

Based on a discussion in #8330 from @SimenB @G-Rath

List pointed out be @G-Rath

Modules which are transformed:

  • snapshotSerializers
  • setupFiles
  • setupFilesAfterEnv
  • globalSetup
  • globalTeardown

Modules which not transformed:

Motivation

Approach will be similar to #8751

Reference #8756

Example

// jest.config.js
module.exports = {
  testEnvironment: 'environment.ts',
  runner: 'runner.ts',
  transform: {
    '^.+\\.ts?$':  'my-transform'
  }
}

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