Skip to content

Commit

Permalink
chore: updated onfido test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
adrienne-deriv committed Oct 11, 2023
1 parent b963e60 commit ecc942b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
6 changes: 6 additions & 0 deletions __mocks__/globals.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,9 @@
jest.mock('copy-anything', () => ({
copy: jest.fn(),
}));

const mock_onfido = {
init: jest.fn().mockResolvedValue({}),
};

window.Onfido = mock_onfido;
4 changes: 0 additions & 4 deletions packages/account/src/Containers/__tests__/routes.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@ jest.mock('Components/Routes', () => ({
BinaryRoutes: jest.fn(() => 'MockedBinaryRoutesComponent'),
}));

jest.mock('onfido-sdk-ui', () => ({
init: jest.fn().mockResolvedValue({}),
}));

jest.mock('@deriv/components', () => ({
...jest.requireActual('@deriv/components'),
PageError: jest.fn(() => 'MockedPageErrorComponent'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@ jest.mock('@deriv/components', () => ({
Loading: jest.fn(() => 'mockedLoading'),
}));

jest.mock('onfido-sdk-ui', () => ({
init: jest.fn().mockResolvedValue({}),
}));

jest.mock('../../Helpers/verification.js', () => ({
populateVerificationStatus: jest.fn().mockReturnValue({
is_age_verified: false,
Expand Down

0 comments on commit ecc942b

Please sign in to comment.