/workerloader-jest-transformer

🃏 Jest transformer for Webpack worker-loader (WIP)

Primary LanguageJavaScriptMIT LicenseMIT

workerloader-jest-transformer

npm-version Build Status codecov license

A Jest transformer for Webpack worker-loader

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

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

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"
  }
}