-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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 Hanson
committed
Jan 23, 2018
1 parent
d4b3bd1
commit 8486bf2
Showing
2 changed files
with
58 additions
and
17 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
24 changes: 24 additions & 0 deletions
24
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,24 @@ | ||
/// <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"]}', | ||
}); |