Skip to content

Commit 6de409d

Browse files
test: Deprecate react-unit-test-utils 15/15 (#680)
1 parent 517b842 commit 6de409d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+1
-183
lines changed

src/components/Banner.test.jsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
import { render, screen } from '@testing-library/react';
22
import Banner from './Banner';
33

4-
jest.unmock('@openedx/paragon');
5-
jest.unmock('react');
6-
74
describe('Banner component', () => {
85
it('renders children content', () => {
96
render(<Banner>Test content</Banner>);

src/containers/CourseCard/components/CourseCardActions/ActionButton/index.test.jsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ import useIsCollapsed from './hooks';
55

66
jest.mock('./hooks', () => jest.fn());
77

8-
jest.unmock('@openedx/paragon');
9-
108
describe('ActionButton', () => {
119
const props = {
1210
className: 'custom-class',

src/containers/CourseCard/components/CourseCardActions/index.test.jsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ jest.mock('./ViewCourseButton', () => jest.fn(() => <div>ViewCourseButton</div>)
1818
jest.mock('./BeginCourseButton', () => jest.fn(() => <div>BeginCourseButton</div>));
1919
jest.mock('./ResumeButton', () => jest.fn(() => <div>ResumeButton</div>));
2020

21-
jest.unmock('@openedx/paragon');
22-
2321
const cardId = 'test-card-id';
2422
const props = { cardId };
2523

src/containers/CourseCard/components/CourseCardBanners/CertificateBanner.test.jsx

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,6 @@ jest.mock('hooks', () => ({
1717
},
1818
}));
1919

20-
jest.unmock('@openedx/paragon');
21-
jest.unmock('@openedx/paragon/icons');
22-
jest.unmock('@edx/frontend-platform/i18n');
23-
jest.unmock('react');
24-
2520
const defaultCertificate = {
2621
availableDate: '10/20/3030',
2722
isRestricted: false,

src/containers/CourseCard/components/CourseCardBanners/CourseBanner.test.jsx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,6 @@ jest.mock('hooks', () => ({
1717
},
1818
}));
1919

20-
jest.unmock('@openedx/paragon');
21-
jest.unmock('@edx/frontend-platform/i18n');
22-
jest.unmock('react');
23-
2420
const cardId = 'test-card-id';
2521

2622
const enrollmentData = {

src/containers/CourseCard/components/CourseCardBanners/CreditBanner/index.test.jsx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,6 @@ jest.mock('./hooks', () => ({
77
useCreditBannerData: jest.fn(),
88
}));
99

10-
jest.unmock('@openedx/paragon');
11-
jest.unmock('@edx/frontend-platform/i18n');
12-
jest.unmock('react');
13-
1410
describe('CreditBanner', () => {
1511
const mockCardId = 'test-card-id';
1612
const mockContentComponent = () => <div data-testid="mock-content">Test Content</div>;

src/containers/CourseCard/components/CourseCardBanners/CreditBanner/views/ApprovedContent.test.jsx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,6 @@ jest.mock('hooks', () => ({
1212
},
1313
}));
1414

15-
jest.unmock('@openedx/paragon');
16-
jest.unmock('react');
17-
jest.unmock('@edx/frontend-platform/i18n');
18-
1915
const cardId = 'test-card-id';
2016
const credit = {
2117
providerStatusUrl: 'test-credit-provider-status-url',

src/containers/CourseCard/components/CourseCardBanners/CreditBanner/views/EligibleContent.test.jsx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,6 @@ jest.mock('tracking', () => ({
2121
},
2222
}));
2323

24-
jest.unmock('@edx/frontend-platform/i18n');
25-
jest.unmock('@openedx/paragon');
26-
jest.unmock('react');
27-
2824
const cardId = 'test-card-id';
2925
const courseId = 'test-course-id';
3026
const credit = {

src/containers/CourseCard/components/CourseCardBanners/CreditBanner/views/MustRequestContent.test.jsx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,6 @@ jest.mock('hooks', () => ({
1818
},
1919
}));
2020

21-
jest.unmock('@openedx/paragon');
22-
jest.unmock('@edx/frontend-platform/i18n');
23-
jest.unmock('react');
24-
2521
const cardId = 'test-card-id';
2622
const requestData = {
2723
url: 'test-request-data-url',

src/containers/CourseCard/components/CourseCardBanners/CreditBanner/views/PendingContent.test.jsx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,6 @@ jest.mock('hooks', () => ({
1010
reduxHooks: { useCardCreditData: jest.fn(), useMasqueradeData: jest.fn() },
1111
}));
1212

13-
jest.unmock('@edx/frontend-platform/i18n');
14-
jest.unmock('@openedx/paragon');
15-
jest.unmock('react');
16-
1713
const cardId = 'test-card-id';
1814
const providerName = 'test-credit-provider-name';
1915
const providerStatusUrl = 'test-credit-provider-status-url';

0 commit comments

Comments
 (0)