File tree Expand file tree Collapse file tree 3 files changed +2
-20
lines changed
todos-typesafe/__snapshots__ Expand file tree Collapse file tree 3 files changed +2
-20
lines changed Original file line number Diff line number Diff line change 11// Jest Snapshot v1, https://goo.gl/fbAQLP
22
3- exports [` Todos Logic initial state should match a snapshot 1` ] = `
3+ exports [` Todos Stories initial state should match a snapshot 1` ] = `
44Object {
5- " errorMessage" : " " ,
6- " isFetching" : false ,
75 " todos" : Array [],
86 " todosFilter" : " " ,
97}
Original file line number Diff line number Diff line change 11// Jest Snapshot v1, https://goo.gl/fbAQLP
22
3- exports [` Todos Logic initial state should match a snapshot 1` ] = `
3+ exports [` Todos Stories initial state should match a snapshot 1` ] = `
44Object {
5- " errorMessage" : " " ,
6- " isFetching" : false ,
75 " todos" : Array [],
86 " todosFilter" : " " ,
97}
Original file line number Diff line number Diff line change @@ -6,27 +6,13 @@ import * as actions from './actions';
66import { ADD , CHANGE_FILTER , TOGGLE } from './constants' ;
77
88export type TodosState = {
9- readonly isFetching : boolean ;
10- readonly errorMessage : string | null ;
119 readonly todos : Todo [ ] ;
1210 readonly todosFilter : TodosFilter ;
1311} ;
1412
1513export type TodosAction = ActionType < typeof actions > ;
1614
1715export default combineReducers < TodosState , TodosAction > ( {
18- isFetching : ( state = false , action ) => {
19- switch ( action . type ) {
20- default :
21- return state ;
22- }
23- } ,
24- errorMessage : ( state = null , action ) => {
25- switch ( action . type ) {
26- default :
27- return state ;
28- }
29- } ,
3016 todos : ( state = [ ] , action ) => {
3117 switch ( action . type ) {
3218 case ADD :
You can’t perform that action at this time.
0 commit comments