JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2699
  • Score
    100M100P100Q117642F
  • License MIT

A prettier runner for Jest

Package Exports

  • jest-runner-prettier

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (jest-runner-prettier) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Build Status npm version codecov

jest-runner-prettier

Prettier runner for Jest

Usage

Install

Install jest(it needs Jest 21+) and jest-runner-prettier

yarn add --dev jest jest-runner-prettier

# or with NPM

npm install --save-dev jest jest-runner-prettier

Add it to your Jest config

In your package.json

{
  "jest": {
    "runner": "jest-runner-prettier",
    "moduleFileExtensions": [
      "js",
      "jsx",
      "json",
      "ts",
      "tsx",
      "css",
      "less",
      "scss",
      "graphql",
      "md",
      "markdown"
    ],
    "testMatch": [
      "**/*.js",
      "**/*.jsx",
      "**/*.json",
      "**/*.ts",
      "**/*.tsx",
      "**/*.css",
      "**/*.less",
      "**/*.scss",
      "**/*.graphql",
      "**/*.md",
      "**/*.markdown"
    ]
  }
}

Or in jest.config.js

module.exports = {
  runner: "jest-runner-prettier",
  moduleFileExtensions: [
    "js",
    "jsx",
    "json",
    "ts",
    "tsx",
    "css",
    "less",
    "scss",
    "graphql",
    "md",
    "markdown"
  ],
  testMatch: [
    "**/*.js",
    "**/*.jsx",
    "**/*.json",
    "**/*.ts",
    "**/*.tsx",
    "**/*.css",
    "**/*.less",
    "**/*.scss",
    "**/*.graphql",
    "**/*.md",
    "**/*.markdown"
  ]
};

Run Jest

yarn jest