Skip to content

Commit

Permalink
Fixes remainder unit tests
Browse files Browse the repository at this point in the history
Signed-off-by: Darshit Chanpura <[email protected]>
  • Loading branch information
DarshitChanpura committed May 11, 2024
1 parent 62f28a9 commit e6321b8
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions public/apps/configuration/panels/test/user-list.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,15 @@ describe('User list', () => {
const mockCoreStart = {
http: 1,
};
const mockDepsStart = {};
const setState = jest.fn();
jest.spyOn(React, 'useState').mockImplementation((initValue) => [initValue, setState]);

it('render empty', () => {
const component = shallow(
<UserList
coreStart={mockCoreStart as any}
depsStart={mockDepsStart as any}
navigation={{} as any}
params={{} as any}
config={{} as any}
Expand All @@ -112,6 +114,7 @@ describe('User list', () => {
shallow(
<UserList
coreStart={mockCoreStart as any}
depsStart={mockDepsStart as any}
navigation={{} as any}
params={{} as any}
config={{} as any}
Expand All @@ -132,6 +135,7 @@ describe('User list', () => {
shallow(
<UserList
coreStart={mockCoreStart as any}
depsStart={mockDepsStart as any}
navigation={{} as any}
params={{} as any}
config={{} as any}
Expand All @@ -146,6 +150,7 @@ describe('User list', () => {
shallow(
<UserList
coreStart={mockCoreStart as any}
depsStart={mockDepsStart as any}
navigation={{} as any}
params={{} as any}
config={{} as any}
Expand All @@ -171,6 +176,7 @@ describe('User list', () => {
shallow(
<UserList
coreStart={mockCoreStart as any}
depsStart={mockDepsStart as any}
navigation={{} as any}
params={{} as any}
config={{} as any}
Expand All @@ -195,6 +201,7 @@ describe('User list', () => {
},
},
};
const mockDepsStart = {};
let component;
const mockUserListingData: InternalUsersListing = {
username: 'user_1',
Expand All @@ -206,6 +213,7 @@ describe('User list', () => {
component = shallow(
<UserList
coreStart={mockCoreStart as any}
depsStart={mockDepsStart as any}
navigation={{} as any}
params={{} as any}
config={{} as any}
Expand Down

0 comments on commit e6321b8

Please sign in to comment.