diff --git a/ui/src/Components/AlertAck/index.test.tsx b/ui/src/Components/AlertAck/index.test.tsx index 5b1b9c94c..a8e122737 100644 --- a/ui/src/Components/AlertAck/index.test.tsx +++ b/ui/src/Components/AlertAck/index.test.tsx @@ -18,7 +18,7 @@ let alerts: APIAlertT[]; let group: APIAlertGroupT; beforeEach(() => { - jest.useFakeTimers("modern"); + jest.useFakeTimers(); jest.setSystemTime(new Date(Date.UTC(2000, 1, 1, 0, 0, 0))); alertStore = new AlertStore([]); diff --git a/ui/src/Components/AlertHistory/index.test.tsx b/ui/src/Components/AlertHistory/index.test.tsx index 04bdc9330..9c2186cf2 100644 --- a/ui/src/Components/AlertHistory/index.test.tsx +++ b/ui/src/Components/AlertHistory/index.test.tsx @@ -57,7 +57,7 @@ const MockAlerts = (alertCount: number) => { }; beforeEach(() => { - jest.useFakeTimers("modern"); + jest.useFakeTimers(); jest.setSystemTime(new Date(Date.UTC(2000, 1, 1, 0, 0, 0))); group = MockGroup("fakeGroup"); diff --git a/ui/src/Components/Fetcher/index.test.tsx b/ui/src/Components/Fetcher/index.test.tsx index 73991bee8..4d86aca6e 100644 --- a/ui/src/Components/Fetcher/index.test.tsx +++ b/ui/src/Components/Fetcher/index.test.tsx @@ -19,7 +19,7 @@ let fetchSpy: any; let requestAnimationFrameSpy: any; beforeEach(() => { - jest.useFakeTimers("modern"); + jest.useFakeTimers(); jest.setSystemTime(new Date(Date.UTC(2000, 1, 1, 0, 0, 0))); alertStore = new AlertStore(["label=value"]); diff --git a/ui/src/Components/Grid/AlertGrid/AlertGroup/Alert/index.test.tsx b/ui/src/Components/Grid/AlertGrid/AlertGroup/Alert/index.test.tsx index 14e84ca01..3655b1f30 100644 --- a/ui/src/Components/Grid/AlertGrid/AlertGroup/Alert/index.test.tsx +++ b/ui/src/Components/Grid/AlertGrid/AlertGroup/Alert/index.test.tsx @@ -23,7 +23,7 @@ let silenceFormStore: SilenceFormStore; let grid: APIGridT; beforeEach(() => { - jest.useFakeTimers("modern"); + jest.useFakeTimers(); jest.setSystemTime(new Date(Date.UTC(2018, 7, 15, 20, 40, 0))); alertStore = new AlertStore([]); silenceFormStore = new SilenceFormStore(); diff --git a/ui/src/Components/Grid/AlertGrid/AlertGroup/GroupFooter/index.test.tsx b/ui/src/Components/Grid/AlertGrid/AlertGroup/GroupFooter/index.test.tsx index ffbd2f427..58aa3c47c 100644 --- a/ui/src/Components/Grid/AlertGrid/AlertGroup/GroupFooter/index.test.tsx +++ b/ui/src/Components/Grid/AlertGrid/AlertGroup/GroupFooter/index.test.tsx @@ -54,7 +54,7 @@ beforeEach(() => { silenceFormStore = new SilenceFormStore(); group = MockGroup(); - jest.useFakeTimers("modern"); + jest.useFakeTimers(); jest.setSystemTime(new Date(Date.UTC(2000, 0, 1, 15, 0, 0))); alertStore.data.setReceivers(["by-cluster-service", "by-name"]); diff --git a/ui/src/Components/Grid/AlertGrid/AlertGroup/Silences.test.tsx b/ui/src/Components/Grid/AlertGrid/AlertGroup/Silences.test.tsx index 146427c07..106f8fc2a 100644 --- a/ui/src/Components/Grid/AlertGrid/AlertGroup/Silences.test.tsx +++ b/ui/src/Components/Grid/AlertGrid/AlertGroup/Silences.test.tsx @@ -15,7 +15,7 @@ describe("", () => { alertStore = new AlertStore([]); silenceFormStore = new SilenceFormStore(); - jest.useFakeTimers("modern"); + jest.useFakeTimers(); jest.setSystemTime(new Date(Date.UTC(2000, 1, 1, 0, 0, 0))); }); diff --git a/ui/src/Components/Grid/AlertGrid/index.test.tsx b/ui/src/Components/Grid/AlertGrid/index.test.tsx index ca13d78ad..7d11a2743 100644 --- a/ui/src/Components/Grid/AlertGrid/index.test.tsx +++ b/ui/src/Components/Grid/AlertGrid/index.test.tsx @@ -457,7 +457,7 @@ describe("", () => { }); it("doesn't throw errors after FontFaceObserver timeout", () => { - jest.useFakeTimers("modern"); + jest.useFakeTimers(); jest.setSystemTime(new Date(Date.UTC(2000, 1, 1, 0, 0, 0))); MockGroupList(1, 1); diff --git a/ui/src/Components/ManagedSilence/DeleteSilence.test.tsx b/ui/src/Components/ManagedSilence/DeleteSilence.test.tsx index 1bd0f8450..c7870654f 100644 --- a/ui/src/Components/ManagedSilence/DeleteSilence.test.tsx +++ b/ui/src/Components/ManagedSilence/DeleteSilence.test.tsx @@ -37,7 +37,7 @@ const generateUpstreams = (): APIAlertsResponseUpstreamsT => ({ }); beforeEach(() => { - jest.useFakeTimers("modern"); + jest.useFakeTimers(); jest.setSystemTime(new Date(Date.UTC(2000, 0, 1, 0, 30, 0))); alertStore = new AlertStore([]); diff --git a/ui/src/Components/ManagedSilence/SilenceComment.test.tsx b/ui/src/Components/ManagedSilence/SilenceComment.test.tsx index e506c638f..0201f1a3e 100644 --- a/ui/src/Components/ManagedSilence/SilenceComment.test.tsx +++ b/ui/src/Components/ManagedSilence/SilenceComment.test.tsx @@ -11,7 +11,7 @@ let silence: APISilenceT; let alertStore: AlertStore; beforeEach(() => { - jest.useFakeTimers("modern"); + jest.useFakeTimers(); jest.setSystemTime(new Date(Date.UTC(2000, 0, 1, 0, 30, 0))); silence = MockSilence(); diff --git a/ui/src/Components/ManagedSilence/SilenceDetails.test.tsx b/ui/src/Components/ManagedSilence/SilenceDetails.test.tsx index f093a5856..c824c615f 100644 --- a/ui/src/Components/ManagedSilence/SilenceDetails.test.tsx +++ b/ui/src/Components/ManagedSilence/SilenceDetails.test.tsx @@ -45,7 +45,7 @@ beforeEach(() => { alertStore.data.setUpstreams(generateUpstreams()); jest.restoreAllMocks(); - jest.useFakeTimers("modern"); + jest.useFakeTimers(); }); afterEach(() => { diff --git a/ui/src/Components/ManagedSilence/index.test.tsx b/ui/src/Components/ManagedSilence/index.test.tsx index c10105c44..5fc7a6855 100644 --- a/ui/src/Components/ManagedSilence/index.test.tsx +++ b/ui/src/Components/ManagedSilence/index.test.tsx @@ -17,7 +17,7 @@ let cluster: string; let silence: APISilenceT; beforeEach(() => { - jest.useFakeTimers("modern"); + jest.useFakeTimers(); jest.setSystemTime(new Date(Date.UTC(2000, 0, 1, 0, 30, 0))); alertStore = new AlertStore([]); diff --git a/ui/src/Components/PaginatedAlertList/index.test.tsx b/ui/src/Components/PaginatedAlertList/index.test.tsx index a9880107f..32c794845 100644 --- a/ui/src/Components/PaginatedAlertList/index.test.tsx +++ b/ui/src/Components/PaginatedAlertList/index.test.tsx @@ -8,7 +8,7 @@ import { PaginatedAlertList } from "."; let alertStore: AlertStore; beforeEach(() => { - jest.useFakeTimers("modern"); + jest.useFakeTimers(); jest.setSystemTime(new Date(Date.UTC(2000, 0, 1, 0, 30, 0))); alertStore = new AlertStore([]); diff --git a/ui/src/Components/SilenceModal/Browser/index.test.tsx b/ui/src/Components/SilenceModal/Browser/index.test.tsx index 4b19b29f1..a70cb497f 100644 --- a/ui/src/Components/SilenceModal/Browser/index.test.tsx +++ b/ui/src/Components/SilenceModal/Browser/index.test.tsx @@ -24,7 +24,7 @@ let silence: APISilenceT; declare let global: any; beforeEach(() => { - jest.useFakeTimers("modern"); + jest.useFakeTimers(); jest.setSystemTime(new Date(Date.UTC(2000, 0, 1, 0, 30, 0))); alertStore = new AlertStore([]); diff --git a/ui/src/Components/SilenceModal/DateTimeSelect/index.test.tsx b/ui/src/Components/SilenceModal/DateTimeSelect/index.test.tsx index 5914c2818..12317fb94 100644 --- a/ui/src/Components/SilenceModal/DateTimeSelect/index.test.tsx +++ b/ui/src/Components/SilenceModal/DateTimeSelect/index.test.tsx @@ -20,7 +20,7 @@ import { let silenceFormStore: SilenceFormStore; beforeEach(() => { - jest.useFakeTimers("modern"); + jest.useFakeTimers(); silenceFormStore = new SilenceFormStore(); silenceFormStore.data.setStart(new Date(2060, 1, 1, 0, 0, 0));