Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
Signed-off-by: Carina Ursu <carina@union.ai>
  • Loading branch information
ursucarina committed May 20, 2024
1 parent 60a1530 commit c756ceb
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion packages/oss-console/src/test/setupTests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,18 @@ jest.mock('react-syntax-highlighter/dist/esm/styles/prism', () => ({

// mock axios to avoid open handles
const axiosMock = jest.mock('axios', () => ({
request: jest.fn().mockResolvedValue({ data: {} }),
create: jest.fn().mockReturnValue({
request: jest.fn().mockResolvedValue({ response: {} }),
get: jest.fn().mockResolvedValue({ data: {} }),
interceptors: {
request: {
use: jest.fn(),
},
response: {
use: jest.fn(),
},
}
}),
defaults: {
transformRequest: [],
transformResponse: [],
Expand Down

0 comments on commit c756ceb

Please sign in to comment.