| 147 | ); |
| 148 | |
| 149 | const hasSingleReturnStatement = value => ( |
| 150 | ( |
| 151 | value.type === 'ArrowFunctionExpression' && |
| 152 | value.body && |
| 153 | value.body.type === 'ObjectExpression' |
| 154 | ) || ( |
| 155 | ( |
| 156 | value.type === 'FunctionExpression' || value.type === 'ArrowFunctionExpression' |
| 157 | ) && |
| 158 | value.body && |
| 159 | value.body.type === 'BlockStatement' && |
| 160 | value.body.body && |
| 161 | value.body.body.length === 1 && |
| 162 | value.body.body[0].type === 'ReturnStatement' && |
| 163 | value.body.body[0].argument |
| 164 | ) |
| 165 | ); |
| 166 | |
| 167 | const isInitialStateLiftable = getInitialState => { |
| 168 | if (!getInitialState || !(getInitialState.value)) { |
no outgoing calls
no test coverage detected