I already ran the command npm install --save-dev @ wojtekmaj / enzyme-adapter-react-17
in my project.
Put this in my setupTests.js file:
import Enzyme from 'enzyme';
import Adapter from '@wojtekmaj/enzyme-adapter-react-17';
Enzyme.configure({ adapter: new Adapter() });
And when I start running the tests I get the error.
This is my test file:
PrimeraApp.test.js
import React from "react";
import PrimeraApp from "../PrimeraApp";
import { shallow } from "enzyme";
describe("PrimeraApp.js", () => {
test("Debe mostrar <PrimeraApp /> correctamente", () => {
const saludo = "Hola mundo";
const wrapper = shallow(<PrimeraApp saludo={saludo} />);
expect(wrapper).toMatchSnapshot();
});
});
If you can help me, Thank you.