Detalhes do pacote

jest-matcher-css

benface1.9kISCdepreciado1.1.0

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

Jest matcher to assert that a string of CSS matches another one

readme (leia-me)

CSS 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.