jest-async-transformer-to-sync-transformer
v0.1.1
Published
jest transformer wrapper for wrapping async transformer as sync transformer
Downloads
26
Maintainers
Readme
jest-async-transformer-to-sync-transformer
The jest transformer that makes existing jest 'async' transformer, using such as processAsync, as a synchronous transformer. This enables to use async-only transformers in any places.
Usage
Install:
npm install -D jest-async-transformer-to-sync-transformerconst jestConfig = {
// ...
transform: {
'\\.[mc]?[j]sx?$': [
'jest-async-transformer-to-sync-transformer',
{ as: 'babel-jest' },
],
},
};Transformer options
Specifies options such as
'<regex>': ['jest-async-transformer-to-sync-transformer', <options>]
as: string (Required)
The base transformer to call.
options?: Record<string, unknown>
Options to pass to the base transformer. Any options are passed to the transformer as-is, but options cannot have non-transferable values.
