blob: c3fa88ec1d4c538bc3ebc60386ba4c82bac34fe7 (
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 };
},
});
|