postcss-test-fixtures

1.0.0 • Public • Published

postcss-test-fixtures

Build Status Coverage percentage XO code style Required node version

Test your postcss plugin with Jest easily.

Installation

npm i -D postcss-test-fixtures

Usage

  • Create this simple test file inside __tests__
// ES6
import test from 'postcss-test-fixtures'
test.run();

// or ES5
var test = require('postcss-test-fixtures').default;
test.run();
  • Create your fixtures directory (/__tests__/fixtures).

  • Add your input and expected output tests ([fixtureName].css + [fixtureName].expected.css)

  • Install jest

npm i -D jest
  • And add a test script to your package.json
"scripts": {
  "test": "jest"
}
  • If you want to report each fixture add turn on jest's verbose mode.
"jest": {
  "verbose": true
}
// Output
✓ Transforms fixture: [fixtureName] (Xms)
  • Enjoy

License

MIT © dmarchena

Readme

Keywords

Package Sidebar

Install

npm i postcss-test-fixtures

Weekly Downloads

0

Version

1.0.0

License

MIT

Last publish

Collaborators

  • dmarchena