Wondering what’s next for npm?Check out our public roadmap! »

    jest-postcss
    TypeScript icon, indicating that this package has built-in type declarations

    0.1.0 • Public • Published

    jest-postcss

    Jest utils for postcss plugins

    Installation

    npm install --save-dev jest-postcss

    Usage

    Import jest-postcss into your test setup once.

    import "jest-postcss"

    Matchers

    .toMatchCSS

    toMatchCSS(cssstring)

    Compares the postcss result css against the Provided CSS

    expect(
      await postcss(plugins).process()
    ).toMatchCSS(`
      .your-css {}
    `)

    Snapshot Serializers

    Allows use of snapshot testing with postcss results, pretifying the CSS for consistency.

    expect(
      await postcss(plugins).process()
    ).toMatchSnapshot()
    expect(
      await postcss(plugins).process()
    ).toMatchInlineSnapshot()

    Install

    npm i jest-postcss

    DownloadsWeekly Downloads

    26

    Version

    0.1.0

    License

    MIT

    Unpacked Size

    5.56 kB

    Total Files

    9

    Last publish

    Collaborators

    • avatar