enzyme-to-snapshot render object as JSON
问题 Why render object JSON in snapshot? For an component const MyComp = <Provider {...stores}> <Router history={history}> <ClassRoom.wrappedComponent {...props} /> </Router> </Provider>, I test as const wrapper = mount(MyComp ); expect(toJson(wrapper)).toMatchSnapshot(); And my snapshot is generated with object json information. <Provider classRoomStore={ClassRoomStore {}} mqttStore={ <MemoryRouter> <Router history={ Object { "action": "POP", "block": [Function], "canGo": [Function], "createHref"