@applitools/eyes.cypress
Advanced tools
Comparing version 3.3.5 to 3.3.6
{ | ||
"name": "@applitools/eyes.cypress", | ||
"version": "3.3.5", | ||
"version": "3.3.6", | ||
"main": "index.js", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -24,2 +24,6 @@ 'use strict'; | ||
function stringifyError(error) { | ||
return `[Eyes test not started] : ${error}`; | ||
} | ||
function testResultsToString(testResultsArr, isGood) { | ||
@@ -31,3 +35,5 @@ return testResultsArr.length | ||
`${isGood ? chalk.green('\u2713') : chalk.red('\u2716')} ${chalk.reset( | ||
stringifyTestResults(testResults), | ||
testResults instanceof Error | ||
? stringifyError(testResults) | ||
: stringifyTestResults(testResults), | ||
)}`, | ||
@@ -34,0 +40,0 @@ ) |
@@ -6,3 +6,3 @@ 'use strict'; | ||
({failed, diffs, passed}, testResults) => { | ||
if (testResults.error) { | ||
if (testResults instanceof Error || testResults.error) { | ||
failed.push(testResults); | ||
@@ -9,0 +9,0 @@ } else { |
@@ -9,5 +9,9 @@ 'use strict'; | ||
if (closeErr) { | ||
return (await getAbortResults()).map(testResult => { | ||
testResult.error = closeErr; | ||
return testResult; | ||
return (await abort()).map(testResult => { | ||
if (testResult) { | ||
testResult.error = closeErr; | ||
return testResult; | ||
} else { | ||
return closeErr; | ||
} | ||
}); | ||
@@ -18,6 +22,2 @@ } else { | ||
} else { | ||
return getAbortResults(); | ||
} | ||
async function getAbortResults() { | ||
return (await abort()).filter(x => !!x); | ||
@@ -24,0 +24,0 @@ } |
@@ -15,4 +15,3 @@ 'use strict'; | ||
const x = await processCloseAndAbort(runningTests); | ||
const testResultsArr = flatten(x); | ||
const testResultsArr = flatten(await processCloseAndAbort(runningTests)); | ||
@@ -19,0 +18,0 @@ const {failed, diffs, passed} = getErrorsAndDiffs(testResultsArr); |
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
124379
704