Skip to content

astagi/workerloader-jest-transformer

Repository files navigation

workerloader-jest-transformer

Maintainers Wanted npm-version Build Status codecov license

A Jest transformer for Webpack worker-loader

This transformer helps you to use Jest with Webpack worker-loader module. Inspired by jsdom-worker

Warnings and help wanted❗️

⚠️ This transformer is highly experimental. Any contribution and advice would be greatly appreciated!

📣 I need help maintaining this project. Send me a DM on Twitter if you want to become a maintainer.

Install

npm install workerloader-jest-transformer --save-dev

or

yarn add workerloader-jest-transformer --dev

Setting up Jest config file

workerloader-jest-transformer must be used in your Jest config file like this:

{
  transform: {
    "^.+\\.worker.[t|j]sx?$": "workerloader-jest-transformer"
  }
}