Skip to content

Commit 58ddd9e

Browse files
committed
Add more failing tests
1 parent 0990c31 commit 58ddd9e

File tree

3 files changed

+96
-0
lines changed

3 files changed

+96
-0
lines changed

tests/cases/fourslash/jsxTagNameDottedAttributeSnippet.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@
1717
//// <Foo.Foo /*2*/
1818
//// </Foo>
1919
////}
20+
////function fn3() {
21+
//// return <Foo>
22+
//// <Foo.Foo cla/*3*/
23+
//// </Foo>
24+
////}
2025

2126
verify.completions(
2227
{
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
/// <reference path="fourslash.ts" />
2+
//@Filename: file.tsx
3+
////interface NestedInterface {
4+
//// Foo: NestedInterface;
5+
//// (props: {className?: string}): any;
6+
////}
7+
////
8+
////declare const Foo: NestedInterface;
9+
////
10+
////function fn1() {
11+
//// return <Foo>
12+
//// <Foo /*1*/ />
13+
//// </Foo>
14+
////}
15+
////function fn2() {
16+
//// return <Foo>
17+
//// <Foo.Foo /*2*/ />
18+
//// </Foo>
19+
////}
20+
////function fn3() {
21+
//// return <Foo>
22+
//// <Foo.Foo cla/*3*/ />
23+
//// </Foo>
24+
////}
25+
26+
verify.completions(
27+
{
28+
marker: test.markers(),
29+
includes: [
30+
{ name: "className", insertText: 'className={$1}', isSnippet: true, sortText: completion.SortText.OptionalMember }
31+
],
32+
preferences: {
33+
jsxAttributeCompletionStyle: "braces",
34+
includeCompletionsWithSnippetText: true,
35+
includeCompletionsWithInsertText: true,
36+
},
37+
}
38+
)
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
/// <reference path="fourslash.ts" />
2+
//@Filename: file.tsx
3+
////interface NestedInterface {
4+
//// Foo: NestedInterface;
5+
//// (props: {}): any;
6+
////}
7+
////
8+
////declare const Foo: NestedInterface;
9+
////
10+
////function fn1() {
11+
//// return <Foo>
12+
//// </*1*/ />
13+
//// </Foo>
14+
////}
15+
////function fn2() {
16+
//// return <Foo>
17+
//// <Fo/*2*/ />
18+
//// </Foo>
19+
////}
20+
////function fn3() {
21+
//// return <Foo>
22+
//// <Foo./*3*/ />
23+
//// </Foo>
24+
////}
25+
////function fn4() {
26+
//// return <Foo>
27+
//// <Foo.F/*4*/ />
28+
//// </Foo>
29+
////}
30+
////function fn5() {
31+
//// return <Foo>
32+
//// <Foo.Foo./*5*/ />
33+
//// </Foo>
34+
////}
35+
////function fn6() {
36+
//// return <Foo>
37+
//// <Foo.Foo.F/*6*/ />
38+
//// </Foo>
39+
////}
40+
41+
verify.completions(
42+
{
43+
marker: test.markers(),
44+
includes: [
45+
{ name: "Foo", insertText: undefined, isSnippet: undefined }
46+
],
47+
preferences: {
48+
jsxAttributeCompletionStyle: "braces",
49+
includeCompletionsWithSnippetText: true,
50+
includeCompletionsWithInsertText: true,
51+
},
52+
}
53+
)

0 commit comments

Comments
 (0)