Skip to content

Commit

Permalink
Merge pull request #1116 from adobe/fixHandleConsentFlickerTest
Browse files Browse the repository at this point in the history
Fix test that wasn't passing in Safari
  • Loading branch information
jonsnyder authored May 17, 2024
2 parents 119ad1d + 076d9f6 commit beac464
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ describe("Personalization::createHandleConsentFlicker", () => {
consent.current.and.returnValue({ state: "out", wasSet: true });
handleConsentFlicker();
expect(showContainers).toHaveBeenCalled();
flushPromiseChains().then(() => {
// expect(consent.awaitConsent).not.toHaveBeenCalled();
return flushPromiseChains().then(() => {
expect(consent.awaitConsent).not.toHaveBeenCalled();
});
});

Expand All @@ -40,8 +40,8 @@ describe("Personalization::createHandleConsentFlicker", () => {
consent.awaitConsent.and.returnValue(Promise.reject());
handleConsentFlicker();
expect(consent.awaitConsent).toHaveBeenCalled();
flushPromiseChains().then(() => {
// expect(showContainers).toHaveBeenCalled();
return flushPromiseChains().then(() => {
expect(showContainers).toHaveBeenCalled();
});
});

Expand All @@ -50,8 +50,8 @@ describe("Personalization::createHandleConsentFlicker", () => {
consent.awaitConsent.and.returnValue(Promise.resolve());
handleConsentFlicker();
expect(consent.awaitConsent).toHaveBeenCalled();
flushPromiseChains().then(() => {
// expect(showContainers).not.toHaveBeenCalled();
return flushPromiseChains().then(() => {
expect(showContainers).not.toHaveBeenCalled();
});
});
});

0 comments on commit beac464

Please sign in to comment.