TypeScript/tests/cases/fourslash/completionOfAwaitPromise7.ts
Andrew Branch 571ca60b08
Add preceding semicolon on await insertion when parentheses are included (#34627)
* Add preceding semicolon on await insertion when parentheses are included

* Just start with precedingToken

* Fix semicolon formatter regression

* Delete test with debatable expected behavior

* Lint after control flow changes
2019-11-19 13:11:42 -08:00

19 lines
395 B
TypeScript

/// <reference path='fourslash.ts'/>
////async function foo(x: Promise<string>) {
//// console.log
//// [|x./**/|]
////}
const replacementSpan = test.ranges()[0];
verify.completions({
marker: "",
includes: [
"then",
{ name: "trim", insertText: ';(await x).trim', replacementSpan },
],
preferences: {
includeInsertTextCompletions: true,
},
});