We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 05b0a0a + 9177c03 commit 812f825Copy full SHA for 812f825
src/__tests__/WebChatContainer.test.tsx
@@ -21,7 +21,22 @@ import { UserDefinedResponseEvent } from '../types/UserDefinedResponseEvent';
21
22
jest.setTimeout(20000);
23
24
+class ResizeObserverMock {
25
+ observe = jest.fn();
26
+
27
+ unobserve = jest.fn();
28
29
+ disconnect = jest.fn();
30
+}
31
32
describe('WebChatContainer', () => {
33
+ beforeAll(() => {
34
+ Object.defineProperty(window, 'ResizeObserver', {
35
+ writable: true,
36
+ configurable: true,
37
+ value: ResizeObserverMock,
38
+ });
39
40
it('tests that the component loads web chat', async () => {
41
const component = <WebChatContainer config={TEST_INSTANCE_CONFIG} />;
42
const { findAllByPlaceholderText } = render(component);
0 commit comments