Test with Enzyme
UI testing with Enzyme and other UI renderers
beforeEach(() => {
const initialState = {
todos: [
{ id: 1, name: 'test', description: 'test' },
{ id: 2, name: 'test', description: 'test description' },
],
};
ReactStateTestBed.setTestEnvironment(new ImmerDataStrategy());
ReactStateTestBed.useComponentRenderer = true;
ReactStateTestBed.strictActionsCheck = false;
ReactStateTestBed.createActions(TodosStateActions, initialState, ['todos']);
wrapper = shallow(<Todos />);
});Last updated