New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

jest-transform-multiple

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jest-transform-multiple

Enable multiple transformers for jest reporting

latest
Source
npmnpm
Version
1.0.0
Version published
Weekly downloads
0
-100%
Maintainers
1
Weekly downloads
 
Created
Source

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

  • GitHub
  • BitBucket
  • GitLab

Jest Transform Multiple is released under the [licensed under the MIT license].

Keywords

jest

FAQs

Package last updated on 11 Dec 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts