forked from webex/widgets
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.tsx
More file actions
32 lines (30 loc) · 858 Bytes
/
Copy pathindex.tsx
File metadata and controls
32 lines (30 loc) · 858 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import React from 'react';
import {render} from '@testing-library/react';
import * as helper from '../../src/helper';
import {OutdialCall} from '../../src/OutdialCall';
// Mock dependencies
jest.mock('@webex/cc-store', () => ({
cc: {},
logger: {
info: jest.fn(),
log: jest.fn(),
error: jest.fn(),
warn: jest.fn(),
},
}));
describe('OutdialCall Component', () => {
it('render OutdialCallComponent with correct props', () => {
const useOutdialCallSpy = jest.spyOn(helper, 'useOutdialCall');
render(<OutdialCall />);
expect(useOutdialCallSpy).toHaveBeenCalledTimes(1);
expect(useOutdialCallSpy).toHaveBeenCalledWith({
cc: {},
logger: {
info: expect.any(Function),
error: expect.any(Function),
log: expect.any(Function),
warn: expect.any(Function),
},
});
});
});