From c9e1898a4e681e8c2dd424b050c15820304f974d Mon Sep 17 00:00:00 2001 From: Huw Wilkins Date: Mon, 9 Nov 2020 13:55:54 +1100 Subject: [PATCH] Mock nanoid for react-components. --- ui/src/setupTests.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ui/src/setupTests.js b/ui/src/setupTests.js index 2dba2161de..adebddc064 100644 --- a/ui/src/setupTests.js +++ b/ui/src/setupTests.js @@ -12,8 +12,8 @@ jest.mock("@reduxjs/toolkit", () => { }; }); -jest.mock("uuid/v4", () => { - return jest.fn(() => "Uakgb_J5m9g-0JDMbcJqLJ"); -}); +jest.mock("nanoid", () => ({ + nanoid: jest.fn(() => "Uakgb_J5m9g-0JDMbcJqLJ"), +})); enableFetchMocks();