diff --git a/src/common/__tests__/RebootButton.test.js b/src/common/__tests__/RebootButton.test.js index 74c5b8e..8ffb440 100644 --- a/src/common/__tests__/RebootButton.test.js +++ b/src/common/__tests__/RebootButton.test.js @@ -46,7 +46,7 @@ describe("", () => { fireEvent.click(getByText(componentContainer, "Reboot")); fireEvent.click(getByText(componentContainer, "Confirm reboot")); expect(mockAxios.post).toHaveBeenCalledWith( - "/reforis/api/reboot", + "/api/reboot", undefined, expect.anything() ); diff --git a/src/testUtils/mockGlobals.js b/src/testUtils/mockGlobals.js index f7818e3..5c5f83e 100644 --- a/src/testUtils/mockGlobals.js +++ b/src/testUtils/mockGlobals.js @@ -10,3 +10,4 @@ global._ = (str) => str; global.ngettext = (str) => str; global.babel = { format: (str) => str }; global.ForisTranslations = { locale: "en" }; +global.setImmediate = (fn) => setTimeout(fn, 0); \ No newline at end of file