()
| 164 | // } |
| 165 | |
| 166 | function* ESModuleParser() { |
| 167 | const lines: Array<unknown> = []; |
| 168 | while (yield hasMore) { |
| 169 | yield /^[\s;]*/; |
| 170 | lines.push( |
| 171 | yield [ConstStatement, ImportStatement, ExportStatement, FunctionParser] |
| 172 | ); |
| 173 | yield /^[\s;]*/; |
| 174 | } |
| 175 | return lines; |
| 176 | } |
| 177 | |
| 178 | it('accepts empty string', () => { |
| 179 | expect(parse('', ESModuleParser())).toEqual({ |
no outgoing calls
no test coverage detected