2.0.0 • Published 3 months ago

jest-scss-export-transform v2.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
3 months ago

jest-scss-export-transform

Jest transformer for .scss files.

Allows the :export SCSS statement to be correctly parsed in the Jest tests.

Install

npm i -D jest-scss-export-transform

or

yarn add -D jest-scss-export-transform

or

pnpm i -D jest-scss-export-transform

Add to your Jest config

Using jest.config.js:

module.exports = {
    // A map from regular expressions to paths to transformers
    transform: {
        '^.+\\.scss$': [
            'jest-scss-export-transform',
            {
                alias: {
                    '@style': './assets/style',
                },
            },
        ],
    },
};