jest-runner-write-prettier

1.1.0 • Public • Published

jest-runner-write-prettier

Usage

Install

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

yarn add --dev jest jest-runner-write-prettier
 
# or with NPM 
 
npm install --save-dev jest jest-runner-write-prettier

Add it to your Jest config

In your package.json

{
  "jest": {
    "runner": "jest-runner-write-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-write-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

Readme

Keywords

none

Package Sidebar

Install

npm i jest-runner-write-prettier

Weekly Downloads

0

Version

1.1.0

License

MIT

Unpacked Size

171 kB

Total Files

11

Last publish

Collaborators

  • wldcordeiro