feat: Set up streak celebration discount experiment (#431)

As part of this work, the streak celebration has been migrated from a Paragon Modal to a Modal Dialog
AA-759
This commit is contained in:
Matthew Piatetsky
2021-05-11 14:06:03 -04:00
committed by GitHub
parent 0f69ed5502
commit d0bcb19754
13 changed files with 283 additions and 65 deletions

View File

@@ -36,6 +36,12 @@ window.getComputedStyle = jest.fn(() => ({
getPropertyValue: jest.fn(),
}));
// Mock Intersection Observer which is unavailable in the context of a test.
global.IntersectionObserver = jest.fn(function mockIntersectionObserver() {
this.observe = jest.fn();
this.disconnect = jest.fn();
});
// Mock media queries because any component that uses `react-break` for responsive breakpoints will
// run into `TypeError: window.matchMedia is not a function`. This avoids that for all of our tests now.
Object.defineProperty(window, 'matchMedia', {