Skip to content

Commit e244e67

Browse files
refactor: Updated component props in test cases
1 parent 1619ebe commit e244e67

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

tests/components/EmptyWindow.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ describe('EmptyWindow', () => {
1717
}
1818
};
1919

20-
const { getByText } = render(<EmptyWindow styles={customStyles} />);
20+
const { getByText } = render(<EmptyWindow styles={customStyles} darkMode={false} />);
2121

2222
expect(getByText(LIST_EMPTY_TEXT)).toBeTruthy();
2323
expect(getByText(LIST_EMPTY_DESCRIPTION)).toBeTruthy();

tests/components/ErrorWindow.test.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,8 @@ describe('ErrorWindow', () => {
2828
}
2929
};
3030

31-
const retryCallback = jest.fn();
32-
3331
const { getByText } = render(
34-
<ErrorWindow styles={customErrorStyles} />
32+
<ErrorWindow styles={customErrorStyles} darkMode={false} />
3533
);
3634

3735
expect(getByText(ERROR_TEXT)).toBeTruthy();

tests/components/card.test.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,11 @@ describe('Card Component', () => {
5555

5656
const { getByTestId } = render(
5757
<Card
58+
darkMode
5859
onCardClick={onCardClickMock}
5960
onDelete={onDeleteMock}
6061
notification={notification}
61-
cardProps={{ hideAvatar: false, showMedia: true }}
62+
cardProps={{ hideAvatar: false }}
6263
styles={customStyles}
6364
/>
6465
);

tests/components/sirenInbox.test.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ describe('SirenInbox', () => {
1010
it('renders without crashing', () => {
1111
render(
1212
<SirenInbox
13-
title='Notifications'
1413
darkMode={false}
1514
onError={(error) => console.log(error)}
1615
/>

tests/components/sirenNotificationIcon.test.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import type { Siren } from '@sirenapp/js-sdk';
66
import { SirenInboxIcon } from '../../src';
77
import type { Theme } from '../../src/types';
88
import * as sirenProvider from '../../src/components/sirenProvider';
9+
import {VerificationStatus} from '../../src/utils/constants'
910

1011
const UnviewedCountReturnResponse = {
1112
data: {
@@ -49,6 +50,7 @@ describe('SirenInboxIcon', () => {
4950

5051
jest.spyOn(sirenProvider, 'useSirenContext').mockReturnValue({
5152
siren: mockSiren as Siren,
53+
verificationStatus: VerificationStatus.PENDING
5254
});
5355

5456
it('renders without crashing', () => {

0 commit comments

Comments
 (0)