Skip to content

Commit

Permalink
add test case for intrinsic elements (#923)
Browse files Browse the repository at this point in the history
  • Loading branch information
zth authored Feb 22, 2024
1 parent 0167930 commit 3b996bb
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
10 changes: 10 additions & 0 deletions analysis/tests/src/CompletionJsx.res
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,13 @@ module CompWithoutJsxPpx = {

// <h1 hidd
// ^com

module IntrinsicElementLowercase = {
type props = {name?: string, age?: int}

@module("react")
external make: (@as("mesh") _, props) => Jsx.element = "createElement"
}

// <IntrinsicElementLowercase
// ^com
27 changes: 27 additions & 0 deletions analysis/tests/src/expected/CompletionJsx.res.txt
Original file line number Diff line number Diff line change
Expand Up @@ -516,3 +516,30 @@ Path PervasivesU.JsxDOM.domProps
"documentation": null
}]

Complete src/CompletionJsx.res 61:30
posCursor:[61:30] posNoWhite:[61:28] Found expr:[61:4->61:29]
JSX <IntrinsicElementLowercase:[61:4->61:29] > _children:None
Completable: Cjsx([IntrinsicElementLowercase], "", [])
Package opens Pervasives.JsxModules.place holder
Resolved opens 1 pervasives
Path IntrinsicElementLowercase.make
[{
"label": "name",
"kind": 4,
"tags": [],
"detail": "option<string>",
"documentation": null
}, {
"label": "age",
"kind": 4,
"tags": [],
"detail": "option<int>",
"documentation": null
}, {
"label": "key",
"kind": 4,
"tags": [],
"detail": "string",
"documentation": null
}]

0 comments on commit 3b996bb

Please sign in to comment.