jest-transform-multiple
v1.0.0
Published
Enable multiple transformers for jest reporting
Downloads
11
Maintainers
Readme
Jest Transform Multiple
by Clark Inada
This module is an extention for Jest and provides a simple way to run multiple transforms.
Usage
Configuration in package.json
// this is the root of the package.json
{
"jest-transform-multiple": string[] | {
modules:[
{
path:string;
config: object;
}
];
config:object;
}
}
// this is the "jest" part of the package.json
{
"jest":{
...otherJestOptions,
"transform": {
".*test.*": "jest-transform-multiple"
}
}
}
Examples
Array of strings
{
"jest-transform-multiple": ["module1", "module2"]
}
With configs
{
"jest-transform-multiple": {
"modules": [
{
"path": "<rootDir>/tranforms.js",
"config": { "hello2": "world2" }
}
],
"config": {
"hello":"world",
"hello2":"world"
}
}
}
In the example above, the config will be merged and yield the following when the process method is invoked:
{
...configPassedFromJest
"hello":"world",
"hello2":"world2"
}
Download
Jest Transform Multiple is released under the [licensed under the MIT license].