jest-styled-components
Advanced tools
Comparing version 7.1.1 to 7.2.0
{ | ||
"name": "jest-styled-components", | ||
"version": "7.1.1", | ||
"version": "7.2.0", | ||
"description": "Jest utilities for Styled Components", | ||
@@ -54,3 +54,3 @@ "main": "./src/index.js", | ||
"react-test-renderer": "^17.0.2", | ||
"styled-components": "^5.0.0" | ||
"styled-components": "^6.0.9" | ||
}, | ||
@@ -57,0 +57,0 @@ "dependencies": { |
@@ -50,2 +50,5 @@ const { getCSS, matcherTest, buildReturnMessage } = require('./utils'); | ||
/** stylis v4 renders descendant selectors without a trailing space sometimes which trips up detection */ | ||
const removeSpaceAfterSelector = input => input.replace(/([>~+]) +/g, '$1') | ||
const normalizeQuotations = (input) => input.replace(/['"]/g, '"'); | ||
@@ -79,4 +82,4 @@ | ||
staticClassNames.some((staticClassName) => | ||
selectors.includes( | ||
normalizeQuotations(getModifiedClassName(className, staticClassName, options.modifier).replace(/['"]/g, '"')) | ||
selectors.map(removeSpaceAfterSelector).includes( | ||
removeSpaceAfterSelector(normalizeQuotations(getModifiedClassName(className, staticClassName, options.modifier).replace(/['"]/g, '"'))) | ||
) | ||
@@ -83,0 +86,0 @@ ) |
@@ -11,2 +11,3 @@ const css = require('@adobe/css-tools'); | ||
const sheet = mainSheet || masterSheet; | ||
const isServer = () => typeof document === 'undefined'; | ||
@@ -22,2 +23,3 @@ | ||
sheet.gs = {}; | ||
sheet.names = new Map(); | ||
@@ -68,3 +70,3 @@ sheet.clearTag(); | ||
if (isNot && expected === undefined) { | ||
return received !== undefined; | ||
return received !== undefined; | ||
} | ||
@@ -71,0 +73,0 @@ |
Sorry, the diff of this file is not supported yet
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
32607
369