(code: string)
| 25 | } |
| 26 | |
| 27 | export function assertCode(code: string): void { |
| 28 | // parse the generated code to make sure it is valid |
| 29 | try { |
| 30 | babelParse(code, { |
| 31 | sourceType: 'module', |
| 32 | plugins: [ |
| 33 | 'typescript', |
| 34 | ['importAttributes', { deprecatedAssertSyntax: true }], |
| 35 | ], |
| 36 | }) |
| 37 | } catch (e: any) { |
| 38 | console.log(code) |
| 39 | throw e |
| 40 | } |
| 41 | expect(code).toMatchSnapshot() |
| 42 | } |
| 43 | |
| 44 | interface Pos { |
| 45 | line: number |
no outgoing calls
no test coverage detected