Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

jest-matcher-css

benface1.9kISCdeprecated1.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

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.

changelog

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project mostly adheres to Semantic Versioning.

1.1.0 - 2019-05-26

Changed

  • Semicolons are now ignored

1.0.3 - 2018-11-04

Re-release with proper tag name.

1.0.2 - 2018-11-04

Fixed

  • Fixed package name in readme and changelog

1.0.1 - 2018-11-04

Added

  • Added a changelog

1.0.0 - 2018-11-04

Initial release