jest-diff
Advanced tools
Comparing version 28.0.0-alpha.5 to 28.0.0-alpha.6
@@ -83,14 +83,9 @@ 'use strict'; | ||
const bCountPadding = ' '.repeat(Math.max(0, -baCountLengthDiff)); | ||
aRest = | ||
aAnnotationPadding + ' ' + aIndicator + ' ' + aCountPadding + aCount; | ||
bRest = | ||
bAnnotationPadding + ' ' + bIndicator + ' ' + bCountPadding + bCount; | ||
aRest = `${aAnnotationPadding} ${aIndicator} ${aCountPadding}${aCount}`; | ||
bRest = `${bAnnotationPadding} ${bIndicator} ${bCountPadding}${bCount}`; | ||
} | ||
return ( | ||
aColor(aIndicator + ' ' + aAnnotation + aRest) + | ||
'\n' + | ||
bColor(bIndicator + ' ' + bAnnotation + bRest) + | ||
'\n\n' | ||
); | ||
const a = `${aIndicator} ${aAnnotation}${aRest}`; | ||
const b = `${bIndicator} ${bAnnotation}${bRest}`; | ||
return `${aColor(a)}\n${bColor(b)}\n\n`; | ||
}; | ||
@@ -97,0 +92,0 @@ |
@@ -218,6 +218,6 @@ 'use strict'; | ||
if (difference !== noDiffMessage && !hasThrown) { | ||
difference = | ||
getCommonMessage(_constants.SIMILAR_MESSAGE, options) + | ||
'\n\n' + | ||
difference; | ||
difference = `${getCommonMessage( | ||
_constants.SIMILAR_MESSAGE, | ||
options | ||
)}\n\n${difference}`; | ||
} | ||
@@ -224,0 +224,0 @@ } |
@@ -29,3 +29,3 @@ 'use strict'; | ||
? color( | ||
indicator + ' ' + formatTrailingSpaces(line, trailingSpaceFormatter) | ||
`${indicator} ${formatTrailingSpaces(line, trailingSpaceFormatter)}` | ||
) | ||
@@ -35,3 +35,3 @@ : indicator !== ' ' | ||
: isFirstOrLast && emptyFirstOrLastLinePlaceholder.length !== 0 | ||
? color(indicator + ' ' + emptyFirstOrLastLinePlaceholder) | ||
? color(`${indicator} ${emptyFirstOrLastLinePlaceholder}`) | ||
: ''; | ||
@@ -38,0 +38,0 @@ |
@@ -48,4 +48,4 @@ 'use strict'; | ||
const diffs = diffStringsRaw( | ||
isMultiline ? a + '\n' : a, | ||
isMultiline ? b + '\n' : b, | ||
isMultiline ? `${a}\n` : a, | ||
isMultiline ? `${b}\n` : b, | ||
true // cleanupSemantic | ||
@@ -52,0 +52,0 @@ ); |
{ | ||
"name": "jest-diff", | ||
"version": "28.0.0-alpha.5", | ||
"version": "28.0.0-alpha.6", | ||
"repository": { | ||
@@ -21,8 +21,8 @@ "type": "git", | ||
"chalk": "^4.0.0", | ||
"diff-sequences": "^28.0.0-alpha.4", | ||
"diff-sequences": "^28.0.0-alpha.6", | ||
"jest-get-type": "^28.0.0-alpha.3", | ||
"pretty-format": "^28.0.0-alpha.5" | ||
"pretty-format": "^28.0.0-alpha.6" | ||
}, | ||
"devDependencies": { | ||
"@jest/test-utils": "^28.0.0-alpha.5", | ||
"@jest/test-utils": "^28.0.0-alpha.6", | ||
"strip-ansi": "^6.0.0" | ||
@@ -36,3 +36,3 @@ }, | ||
}, | ||
"gitHead": "46fb19b2628bd87676c10730ba19592c30b05478" | ||
"gitHead": "6284ada4adb7008f5f8673b1a7b1c789d2e508fb" | ||
} |
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
78628
1685