blob: 1783f17470c9033fa4cf954a015e3304519f80a9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
import { configure } from 'enzyme';
import Adapter from 'enzyme-adapter-react-16';
configure({ adapter: new Adapter() });
expect.extend({
toBeCalledWithVariables(received, argument) {
const receivedVariables = received.mock.calls[0][0].variables;
const pass = this.equals(receivedVariables, argument);
const message = () =>
`expected ${this.utils.printExpected(argument)} to match ${this.utils.printReceived(
receivedVariables
)}`;
return { message, pass };
},
});
|