当我运行创建和更新快照的yarn test
时,我的本地快照与我们团队的master分支冲突,并且:
git clone
,yarn install
,然后更改yarn test
我怀疑是酶,因为它是lib浅层渲染的东西,但是我敢肯定,yarn list *enzyme*
想知道为什么我会出现这种不一致的情况。谢谢。
<img
alt=""
className="centered-speed-dial"
src={
Object {
// In master branch
- "ReactComponent": [Function],
// what my local try to update it to
+ "ReactComponent": Object {
+ "$$typeof": Symbol(react.forward_ref),
+ "render": [Function],
+ },
"__esModule": true,
"default": "speed-dial.svg",
}
}
/>
44 | props.hasError = true;
45 | const wrapper = renderWrapper();
> 46 | expect(toJson(wrapper)).toMatchSnapshot();
| ^
47 | });
48 | });
49 | });