hankandre / jest-runner-stylelint

Stylelint runner for Jest

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build Status npm version codecov

jest-runner-stylelint

Stylelint runner for Jest

Usage

Install

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

yarn add --dev jest jest-runner-stylelint

# or with NPM

npm install --save-dev jest jest-runner-stylelint

Add it to your Jest config

In your package.json

{
  "jest": {
    "runner": "jest-runner-stylelint",
    "moduleFileExtensions": [
      "css"
    ],
    "testMatch": [
      "**/*.css"
    ]
  }
}

Or in jest.config.js

module.exports = {
  runner: "jest-runner-stylelint",
  moduleFileExtensions: [
    "css"
  ],
  testMatch: [
    "**/*.css"
  ]
};

Run Jest

yarn jest

About

Stylelint runner for Jest


Languages

Language:JavaScript 96.6%Language:CSS 3.4%