I have the issue that if I run my test without the --coverage option everything passes, but as soon as I run jest with the --coverage option some of my test fail.
Here is the log:
Button › Primary button › should render a primary button
undefined:3:457: property missing ':'
at Object.it (src/components/Buttons/Button/Button.test.js:13:24)
at Promise.resolve.then.el (node_modules/p-map/index.js:46:16)
And the test:
it('should render a primary button', () => {
const props = { primary: true };
const rendered = renderer.create(<Button { ...props }>Some Button</Button>).toJSON();
expect(rendered).toMatchSnapshot();
});
The failing line is expect(rendered).toMatchSnapshot();
Anyone any ideas?