Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@ayusharma/jest-css-module-transformer

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ayusharma/jest-css-module-transformer

A jest preprocessor for css and scss files

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Jest css module transformer

This package provides a mock to *.scss & *.css files and keeps the class names intact in Jest snapshot

Original markup:

    <div class=`container ${css.marginAuto}`>
        <section class=`${css.blogSection}`>...</section>
    </div>

Snapshot markup without transformation:

    <div class="container undefined">
        <section class="undefined">...</section>
    </div>

Snapshot markup with transformation:

    <div class="container marginAuto">
        <section class="blogSection">...</section>
    </div>

Installation

    yarn add --dev @ayusharma/jest-css-module-transformer

Or

    npm install --save-dev @ayusharma/jest-css-module-transformer

Use

Add the following entry in Jest configuration file.

    transform: {
        '^.+\\.(css|scss)$': '@ayusharma/jest-css-module-transformer'
    },

Keywords

FAQs

Package last updated on 03 May 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc