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

Commit a35afda

Browse files
committed
Added JSX autocomplete test.
1 parent 0799465 commit a35afda

File tree

3 files changed

+36
-2
lines changed

3 files changed

+36
-2
lines changed

test/bsconfig.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"name": "test",
33
"sources": "src",
4-
"bs-dependencies": ["reason-react"]
5-
}
4+
"bs-dependencies": ["reason-react"],
5+
"reason": { "react-jsx": 3 }
6+
}

test/src/Jsx.res

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
module M = {
2+
@react.component
3+
let make = (~first, ~fun="", ~second="") => React.string(first ++ fun++ second)
4+
}
5+
6+
let d = <M first="abc" />
7+
// ^def
8+
9+
//^com <M second=fi
10+
11+
12+
//^com <M second="abc" f

test/src/expected/Jsx.res.txt

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{"uri": "Jsx.res", "range": "{"start": "{"line": "2", "character": "6"}", "end": "{"line": "2", "character": "10"}"}"}
2+
[]
3+
[{
4+
"label": "key",
5+
"kind": 4,
6+
"tags": [],
7+
"detail": "string",
8+
"documentation": {"kind": "markdown", "value": "\nJsx.res:11"}
9+
}, {
10+
"label": "first",
11+
"kind": 4,
12+
"tags": [],
13+
"detail": "string",
14+
"documentation": {"kind": "markdown", "value": "\nJsx.res:11"}
15+
}, {
16+
"label": "fun",
17+
"kind": 4,
18+
"tags": [],
19+
"detail": "option<string>",
20+
"documentation": {"kind": "markdown", "value": "\nJsx.res:11"}
21+
}]

0 commit comments

Comments
 (0)