Skip to content

Commit

Permalink
Fail graphics tests using expect instead of throwing error
Browse files Browse the repository at this point in the history
  • Loading branch information
SlicedSilver committed Nov 4, 2024
1 parent e2fffc0 commit f37c218
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/e2e/graphics/graphics-test-cases.ts
Original file line number Diff line number Diff line change
Expand Up @@ -204,10 +204,10 @@ function registerTestCases(testCases: TestCase[], screenshoter: Screenshoter, ou
expect(compareResult.diffPixelsCount).to.be.equal(0, 'number of different pixels must be 0');
} else {
writeTestDataItem('3.errors.txt', errors.join('\n\n'));
throw new Error(
`The error(s) happened while generating a screenshot for the page(s): ${failedPages.join(', ')}.
See ${testCaseOutDir} directory for an output of the test case.`
);
expect(
false,
`The error(s) happened while generating a screenshot for the page(s): ${failedPages.join(', ')}. See ${testCaseOutDir} directory for an output of the test case.`
).to.equal(true);
}

rmRf(testCaseOutDir);
Expand Down

0 comments on commit f37c218

Please sign in to comment.