jest-matcher-css
v1.0.2CSS Matcher for Jest
Installation
npm install jest-matcher-css
Usage
In your Jest config:
"jest": {
"setupTestFrameworkScriptFile": "./setup.js"
}
In setup.js
:
const cssMatcher = require('jest-matcher-css');
expect.extend({
toMatchCss: cssMatcher,
});
Credit
Written by Adam Wathan for Tailwind CSS. I moved it into its own module to use it in a couple of Tailwind plugins.
npm i [email protected]
Metadata
- ISC
- Whatever
- BenoƮt Rouleau
- released 11/4/2018