mirror of
https://github.com/prymitive/karma
synced 2026-05-05 03:16:51 +00:00
fix(tests): update tests for react-cool-dimensions 2.0.3
This commit is contained in:
committed by
Łukasz Mierzwa
parent
874c9ece5b
commit
cf44458bbf
@@ -35,6 +35,11 @@ beforeEach(() => {
|
||||
|
||||
window.matchMedia = mockMatchMedia({});
|
||||
|
||||
window.requestAnimationFrame = (cb: FrameRequestCallback) => {
|
||||
cb(0);
|
||||
return 0;
|
||||
};
|
||||
|
||||
jest.spyOn(React, "useContext").mockImplementation(() => MockThemeContext);
|
||||
|
||||
Object.defineProperty(document.body, "clientWidth", {
|
||||
|
||||
@@ -35,6 +35,11 @@ beforeEach(() => {
|
||||
// fix startsAt & endsAt dates so they don't change between tests
|
||||
silenceFormStore.data.setStart(new Date(Date.UTC(2018, 1, 30, 10, 25, 50)));
|
||||
silenceFormStore.data.setEnd(new Date(Date.UTC(2018, 1, 30, 11, 25, 50)));
|
||||
|
||||
jest.spyOn(window, "requestAnimationFrame").mockImplementation((cb) => {
|
||||
cb(0);
|
||||
return 0;
|
||||
});
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
|
||||
Reference in New Issue
Block a user