bigbuffet-rw/app/soapbox/test_setup.js

17 lines
351 B
JavaScript
Raw Normal View History

2020-03-27 13:59:38 -07:00
'use strict';
import { configure } from 'enzyme';
import Adapter from 'enzyme-adapter-react-16';
import { __clear as clearApiMocks } from 'soapbox/api';
2020-03-27 13:59:38 -07:00
// Enzyme
2020-03-27 13:59:38 -07:00
const adapter = new Adapter();
configure({ adapter });
// API mocking
jest.mock('soapbox/api');
afterEach(() => clearApiMocks());
2022-03-21 11:09:01 -07:00
jest.mock('uuid', () => ({ v4: jest.fn(() => 1) }));