Skip to content
This repository was archived by the owner on Apr 24, 2021. It is now read-only.

Commit 39d853f

Browse files
committed
Add test for "Add autocomplete for props in JSX components.".
1 parent a8a9235 commit 39d853f

File tree

2 files changed

+40
-0
lines changed

2 files changed

+40
-0
lines changed

test/src/Complete.res

+16
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,19 @@ let fa:ForAuto.t = 34
3939

4040
//^com "hello"->Js.Dict.u
4141

42+
module O = {
43+
module Comp = {
44+
@react.component
45+
let make = (~first="", ~zoo=3, ~second) =>
46+
React.string(first ++ second ++ string_of_int(zoo))
47+
}
48+
}
49+
50+
let zzz = 11
51+
52+
//^com let comp = <O.Comp second=z
53+
54+
//^com let comp = <O.Comp z
55+
56+
57+

test/src/expected/Complete.res.txt

+24
Original file line numberDiff line numberDiff line change
@@ -430,3 +430,27 @@ Complete src/Complete.res 38:2
430430
"documentation": {"kind": "markdown", "value": "Experimental internal function\n\n\n\n\njs_dict.mli:63"}
431431
}]
432432

433+
Complete src/Complete.res 50:2
434+
[{
435+
"label": "zzz",
436+
"kind": 12,
437+
"tags": [],
438+
"detail": "int",
439+
"documentation": {"kind": "markdown", "value": "\nComplete.res:50"}
440+
}]
441+
442+
Complete src/Complete.res 52:2
443+
[{
444+
"label": "key",
445+
"kind": 4,
446+
"tags": [],
447+
"detail": "string",
448+
"documentation": {"kind": "markdown", "value": "\nComplete.res:53"}
449+
}, {
450+
"label": "zoo",
451+
"kind": 4,
452+
"tags": [],
453+
"detail": "option<int>",
454+
"documentation": {"kind": "markdown", "value": "\nComplete.res:53"}
455+
}]
456+

0 commit comments

Comments
 (0)