2022-04-04 08:51:32 -07:00
|
|
|
'use strict';
|
|
|
|
|
|
|
|
import { __clear as clearApiMocks } from '../__mocks__/api';
|
|
|
|
|
|
|
|
// API mocking
|
|
|
|
jest.mock('soapbox/api');
|
|
|
|
afterEach(() => clearApiMocks());
|
|
|
|
|
|
|
|
// Mock external dependencies
|
|
|
|
jest.mock('uuid', () => ({ v4: jest.fn(() => 1) }));
|
2022-04-06 07:10:21 -07:00
|
|
|
|
|
|
|
const intersectionObserverMock = () => ({ observe: () => null, disconnect: () => null });
|
|
|
|
window.IntersectionObserver = jest.fn().mockImplementation(intersectionObserverMock);
|