Socket
Socket
Sign inDemoInstall

jest-runner-write-prettier

Package Overview
Dependencies
15
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    jest-runner-write-prettier

A Jest Runner for Prettier that writes the changes.


Version published
Weekly downloads
1
decreased by-94.74%
Maintainers
1
Install size
5.29 MB
Created
Weekly downloads
 

Readme

Source

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

FAQs

Last updated on 17 May 2018

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc