-
Notifications
You must be signed in to change notification settings - Fork 12.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
At
<div x=/**/
, completion insertText should be wrapped in braces (#…
- Loading branch information
Andy
authored
Jan 25, 2018
1 parent
b9bb745
commit dcd3b5e
Showing
2 changed files
with
56 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
tests/cases/fourslash/completionsJsxAttributeInitializer.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/// <reference path="fourslash.ts" /> | ||
|
||
// @Filename: /a.tsx | ||
////function f(this: { p: number; "a b": number }, x: number): void { | ||
//// <div foo=/**/ />; | ||
////} | ||
|
||
goTo.marker(); | ||
|
||
verify.completionListContains("x", "(parameter) x: number", "", "parameter", undefined, undefined, { | ||
includeInsertTextCompletions: true, | ||
insertText: "{x}", | ||
}); | ||
|
||
verify.completionListContains("p", "(property) p: number", "", "property", undefined, undefined, { | ||
includeInsertTextCompletions: true, | ||
insertText: "{this.p}", | ||
}); | ||
|
||
verify.completionListContains("a b", '(property) "a b": number', "", "property", undefined, undefined, { | ||
includeInsertTextCompletions: true, | ||
insertText: '{this["a b"]}', | ||
}); |