I am doing testing with enzyme for my props component and have this error:
import icon from "./icon.svg";
it("should have a prop space", () => {
const tree = shallow(
<button name="button test" space={icon} />
);
expect(tree.props().space).toEqual(<span>{icon} </span>);
});
I am getting this message:
expect(received).toEqual(expected)
Expected value to equal: <span>test-file-stub </span> Received: <span>test-file-stub </span>
What am I missing?
Aucun commentaire:
Enregistrer un commentaire