Skip to content

Commit

Permalink
Merge branch 'next-30591/fix-flaky-jest-test-part-two' into 'trunk'
Browse files Browse the repository at this point in the history
NEXT-30591 - fix flaky jest test

See merge request shopware/6/product/platform!11922
  • Loading branch information
jleifeld committed Nov 22, 2023
2 parents 515789e + 960d1d1 commit 38a0bbe
Showing 1 changed file with 10 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -153,11 +153,18 @@ global.console.error = (...args) => {

if (typeof allowedError.msg === 'string') {
if (typeof args[0] === 'string') {
let shouldBeSilenced = args[0].includes(allowedError.msg);
const shouldBeSilenced = args[0].includes(allowedError.msg);

if (allowedError.msgCheck) {
shouldBeSilenced = allowedError.msgCheck(args[0]);
if (shouldBeSilenced) {
silenceError = true;
}
}
return;
}

if (typeof allowedError.msgCheck === 'function') {
if (allowedError.msgCheck) {
const shouldBeSilenced = allowedError.msgCheck(args[0]);

if (shouldBeSilenced) {
silenceError = true;
Expand Down

0 comments on commit 38a0bbe

Please sign in to comment.