{"ScriptPreparationCode":null,"TestCases":[{"Name":"Object","Code":"const state = { selected1: 0, selected2: 0}\r\nconst reducer1 = type =\u003E {\r\n const allTypes = {\r\n [\u0027SELECT1\u0027]: () =\u003E ({\r\n ...state,\r\n selected1: 1\r\n }),\r\n [\u0027SELECT2\u0027]: () =\u003E ({\r\n ...state,\r\n selected2: 2\r\n }),\r\n }\r\n\r\n const actionMatch = allTypes[type]\r\n if (!actionMatch) return state\r\n return actionMatch()\r\n}\r\n\r\nreturn reducer1(\u0027SELECT2\u0027)","IsDeferred":false},{"Name":"Switch","Code":"const state = { selected1: 0, selected2: 0}\r\nconst reducer2 = type =\u003E {\r\n switch(type) {\r\n case \u0027SELECT1\u0027:\r\n return ({\r\n ...state,\r\n selected1: 1\r\n })\r\n case \u0027SELECT@\u0027:\r\n return ({\r\n ...state,\r\n selected2: 2\r\n })\r\n default: \r\n return state\r\n }\r\n}\r\n\r\nreturn reducer2(\u0027SELECT2\u0027)","IsDeferred":false}]}