Skip to content

Files

Latest commit

Apr 22, 2020
dccf40a · Apr 22, 2020

History

History
This branch is 1601 commits behind wix/stylable:master.

jest

@stylable/jest

npm version

@stylable/jest is a simple integration that allows testing your Stylable React components using Jest.

Installation

This package is still a work-in-progress within the Stylable mono-repo. Once it matures, further details will be added here.

Usage

Add the transformation to the jest.config.js file:

module.exports = {
  transform: {
    '\\.st\\.css?$': require.resolve('@stylable/jest'),
  },
  transformIgnorePatterns: [
    '/node_modules/(?!(.*?\\.st\\.css$))' // libraries publish .st.css files in their dist
  ]
};

License

Copyright (c) 2017 Wix.com Ltd. All Rights Reserved. Use of this source code is governed by a BSD license.