From c6ed6938af7de8bf874c3aeee396cf44c8adae2e Mon Sep 17 00:00:00 2001 From: Leangseu Kim Date: Wed, 2 Feb 2022 13:08:16 -0500 Subject: [PATCH] fix: update setup test to mock locationId --- src/containers/ListView/ListViewBreadcrumb.test.jsx | 3 --- src/data/redux/thunkActions/app.test.js | 3 --- src/setupTest.js | 4 ++++ 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/containers/ListView/ListViewBreadcrumb.test.jsx b/src/containers/ListView/ListViewBreadcrumb.test.jsx index 096db71..02c45b8 100644 --- a/src/containers/ListView/ListViewBreadcrumb.test.jsx +++ b/src/containers/ListView/ListViewBreadcrumb.test.jsx @@ -23,9 +23,6 @@ jest.mock('data/redux', () => ({ }, })); -jest.mock('data/constants/app', () => ({ - locationId: 'fake-location-id', -})); jest.mock('data/services/lms/urls', () => ({ openResponse: (courseId) => `openResponseUrl(${courseId})`, ora: (courseId, locationId) => `oraUrl(${courseId}, ${locationId})`, diff --git a/src/data/redux/thunkActions/app.test.js b/src/data/redux/thunkActions/app.test.js index 5c672bd..87200a3 100644 --- a/src/data/redux/thunkActions/app.test.js +++ b/src/data/redux/thunkActions/app.test.js @@ -6,9 +6,6 @@ import thunkActions from './app'; jest.mock('./requests', () => ({ initializeApp: (args) => ({ initializeApp: args }), })); -jest.mock('data/constants/app', () => ({ - locationId: 'fake-location-id', -})); describe('app thunkActions', () => { let dispatch; diff --git a/src/setupTest.js b/src/setupTest.js index cb4bc05..23d39fa 100755 --- a/src/setupTest.js +++ b/src/setupTest.js @@ -95,3 +95,7 @@ jest.mock('@edx/paragon/icons', () => ({ InfoOutline: jest.fn().mockName('icons.InfoOutline'), Launch: jest.fn().mockName('icons.Launch'), })); + +jest.mock('data/constants/app', () => ({ + locationId: 'fake-location-id', +}));