jest-matcher-css
v1.1.0CSS 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 jest-matcher-css
Metadata
- ISC
- Whatever
- BenoƮt Rouleau
- released 5/26/2019