@stylable/jest
is a simple integration that allows testing your Stylable React components using Jest.
This package is still a work-in-progress within the Stylable mono-repo. Once it matures, further details will be added here.
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
]
};
Copyright (c) 2017 Wix.com Ltd. All Rights Reserved. Use of this source code is governed by a BSD license.