Im trying to test my components with Jest. I believe that I've installed all the required modules to run the tests. Last thing that I did was to run
yarn add -D babel-plugin-transform-es2015-modules-commonjs
.
This is my code while trying to do a simple Jest test:
import React, { Component } from 'react';
import { shallow } from 'enzyme';
import Market from '../src/components/Market.js';
test('Market should render as expected', () => {
const component = shallow(<Market />);
console.log(component);
});
The error message on the console points to the first <
at the start of invoking the Market component on line 6.
Aucun commentaire:
Enregistrer un commentaire