refactor(compiler-sfc): improve TLA codegen

This commit is contained in:
Evan You
2021-09-16 17:07:29 -04:00
parent 39cebf5f7a
commit cab9541ffd
3 changed files with 84 additions and 100 deletions

View File

@@ -1089,7 +1089,7 @@ const emit = defineEmits(['a', 'b'])
})
// should prepend semicolon
test('await in expression statement', () => {
test('nested leading await in expression statement', () => {
const code = assertAwaitDetection(`foo()\nawait 1 + await 2`)
expect(code).toMatch(`foo()\n;(`)
})