enzyme test react state code example Example: enzyme check state const component = wrapper.instance().state;