jest-styled-components
Advanced tools
Comparing version 4.1.0 to 4.1.1
{ | ||
"name": "jest-styled-components", | ||
"version": "4.1.0", | ||
"version": "4.1.1", | ||
"description": "Jest utilities for Styled Components", | ||
@@ -5,0 +5,0 @@ "main": "./src/index.js", |
@@ -33,6 +33,9 @@ const css = require('css') | ||
const getRules = () => | ||
StyleSheet.globalStyleSheet.sheet && StyleSheet.componentStyleSheet.sheet | ||
? StyleSheet.rules().map(rule => rule.cssText).join('\n') | ||
: '' | ||
const getCSS = () => { | ||
const style = isOverV2() | ||
? getStyle() | ||
: StyleSheet.rules().map(rule => rule.cssText).join('\n') | ||
const style = isOverV2() ? getStyle() : getRules() | ||
@@ -49,3 +52,3 @@ return css.parse(style) | ||
const getHashes = () => | ||
getClassNames().concat(getComponentIDs()).filter(Boolean) | ||
isOverV2() ? getClassNames().concat(getComponentIDs()).filter(Boolean) : [] | ||
@@ -52,0 +55,0 @@ module.exports = { |
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
17350
283