Documents / @faasjs/jest

@faasjs/jest

License: MITopen in new windowNPM Versionopen in new window

A jest plugin for faasjs projects.

Install

npm install -d @faasjs/jest

Usage

Add jest to your package.json:

"jest": {
  "transform": {
    ".(jsx|tsx?)": "./packages/jest"
  },
  "testRegex": "/*\\.test\\.tsx?$",
  "coveragePathIgnorePatterns": [
    "/lib/",
    "/dist/",
    "/tmp/",
    "/__tests__/",
    "/examples/",
    "!*.d.ts"
  ],
  "moduleNameMapper": {
    "\\.(css|less|sass|jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "@faasjs/jest"
  }
}