I am getting following error when I tried to access the state from other component spec instead of App component spec, Could you please help for access the other component state variable in respective spec file?
_
Color Picker:
Error: ShallowWrapper::state() can only be called on class components
at ShallowWrapper.state (nodemodules/enzyme/src/ShallowWrapper.js:1192:13)
at Context. (src/components/DeviceDetails/DeviceDetails.spec.js:61:49)
at processImmediate (internal/timers.js:456:21)
Hi,
I am getting following error when I tried to access the state from other component spec instead of App component spec, Could you please help for access the other component state variable in respective spec file?
_
Color Picker:
Error: ShallowWrapper::state() can only be called on class components
at ShallowWrapper.state (nodemodules/enzyme/src/ShallowWrapper.js:1192:13)
at Context. (src/components/DeviceDetails/DeviceDetails.spec.js:61:49)
at processImmediate (internal/timers.js:456:21)
Thnx