@stylable/jest
Advanced tools
Comparing version 0.1.19 to 0.1.20
{ | ||
"name": "@stylable/jest", | ||
"version": "0.1.19", | ||
"version": "0.1.20", | ||
"description": "Test your Stylable React components using Jest", | ||
@@ -14,4 +14,4 @@ "main": "dist/jest.js", | ||
"dependencies": { | ||
"@stylable/node": "^0.1.20", | ||
"@stylable/runtime": "^0.1.12" | ||
"@stylable/node": "^0.1.21", | ||
"@stylable/runtime": "^0.1.13" | ||
}, | ||
@@ -30,3 +30,3 @@ "files": [ | ||
"license": "BSD-3-Clause", | ||
"gitHead": "6e2c807b60e65cc89457cc7e60eef1b819956258" | ||
"gitHead": "4de50a2e7656c4b7e3dab5619683e11e7364ebfc" | ||
} |
@@ -12,18 +12,12 @@ # @stylable/jest | ||
Use the `process` utility imported from `@stylable/jest` to configure your Jest setup to support Stylable stylesheets, turning them into resolvable modules. | ||
> Note: Jest should also be configured to ignore `.st.css` files in its transformations. | ||
```ts | ||
const { process } = require('@stylable/jest'); | ||
const config = merge(jestProjectConfig, { | ||
Add the transformation to the `jest.config.js` file: | ||
```js | ||
module.exports = { | ||
transform: { | ||
'\\.jsx?$': require.resolve('babel-jest'), | ||
'\\.st.css?$': process, | ||
'\\.st\\.css?$': require.resolve('@stylable/jest'), | ||
}, | ||
}); | ||
config.transformIgnorePatterns = (config.transformIgnorePatterns || []) | ||
.concat(['/node_modules/(?!(.*?\\.st\\.css$))']); | ||
transformIgnorePatterns: [ | ||
'/node_modules/(?!(.*?\\.st\\.css$))' // libraries publish .st.css files in their dist | ||
] | ||
}; | ||
``` | ||
@@ -30,0 +24,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4399
28
Updated@stylable/node@^0.1.21
Updated@stylable/runtime@^0.1.13