
Security News
Crates.io Users Targeted by Phishing Emails
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
@stylable/jest
Advanced tools
@stylable/jest
is a simple integration that allows testing your Stylable React components using Jest.
Install @stylable/jest
as a dev dependency in your local project.
Install using npm:
npm install @stylable/jest --save-dev
Install using yarn:
yarn add @stylable/jest --dev
Add the transformer to your jest.config.js
file:
module.exports = {
transform: {
'\\.st\\.css?$': '@stylable/jest',
}
};
See the interface for StylableConfig
here.
module.exports = {
transform: {
'\\.st\\.css?$': ['@stylable/jest', { stylable: { /* Stylable options */ } }],
}
};
To prevent existing CSS integrations from affecting Stylable files, ignore '.st.css' in the integration configuration.
Change:
"moduleNameMapper": {
"\\.(css|scss)$": "SOME_MOCK_PATH"
},
To:
"moduleNameMapper": {
"(?<!\\.st)\\.(css|scss)$": "SOME_MOCK_PATH"
},
node_modules
stylesheetsTo disable transformation for stylehseets originating from your node_modules
add the following configuration:
module.exports = {
// existing configuration...
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 MIT license.
FAQs
Test your Stylable React components using Jest
The npm package @stylable/jest receives a total of 459 weekly downloads. As such, @stylable/jest popularity was classified as not popular.
We found that @stylable/jest demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 6 open source maintainers collaborating on the project.
Did you know?
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.
Security News
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
Product
Socket now lets you customize pull request alert headers, helping security teams share clear guidance right in PRs to speed reviews and reduce back-and-forth.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.