Skip to content

Commit 3b996bb

Browse files
authored
add test case for intrinsic elements (#923)
1 parent 0167930 commit 3b996bb

File tree

2 files changed

+37
-0
lines changed

2 files changed

+37
-0
lines changed

analysis/tests/src/CompletionJsx.res

+10
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,13 @@ module CompWithoutJsxPpx = {
5151

5252
// <h1 hidd
5353
// ^com
54+
55+
module IntrinsicElementLowercase = {
56+
type props = {name?: string, age?: int}
57+
58+
@module("react")
59+
external make: (@as("mesh") _, props) => Jsx.element = "createElement"
60+
}
61+
62+
// <IntrinsicElementLowercase
63+
// ^com

analysis/tests/src/expected/CompletionJsx.res.txt

+27
Original file line numberDiff line numberDiff line change
@@ -516,3 +516,30 @@ Path PervasivesU.JsxDOM.domProps
516516
"documentation": null
517517
}]
518518

519+
Complete src/CompletionJsx.res 61:30
520+
posCursor:[61:30] posNoWhite:[61:28] Found expr:[61:4->61:29]
521+
JSX <IntrinsicElementLowercase:[61:4->61:29] > _children:None
522+
Completable: Cjsx([IntrinsicElementLowercase], "", [])
523+
Package opens Pervasives.JsxModules.place holder
524+
Resolved opens 1 pervasives
525+
Path IntrinsicElementLowercase.make
526+
[{
527+
"label": "name",
528+
"kind": 4,
529+
"tags": [],
530+
"detail": "option<string>",
531+
"documentation": null
532+
}, {
533+
"label": "age",
534+
"kind": 4,
535+
"tags": [],
536+
"detail": "option<int>",
537+
"documentation": null
538+
}, {
539+
"label": "key",
540+
"kind": 4,
541+
"tags": [],
542+
"detail": "string",
543+
"documentation": null
544+
}]
545+

0 commit comments

Comments
 (0)