Skip to content

Commit ba1fb40

Browse files
shayanhabibiMangelMaxime
authored andcommitted
Add test for self-closing tag
1 parent cd4dfbc commit ba1fb40

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

tests/React/__tests__/Tests.fs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,11 @@ Jest.describe("React tests", (fun () ->
4646
Jest.expect(header).toHaveTextContent("6")
4747
))
4848

49+
Jest.test("JSX EmptyElem render self-closing tags", (fun () ->
50+
let elem = Counter.CounterJSX(5)
51+
Jest.expect(elem).toStrictEqual(Fable.Core.JSX.jsx "<CounterJSX init={5} />")
52+
))
53+
4954
Jest.test("SpreadSheet renders correctly", (fun () ->
5055
let elem = RTL.render(SpreadSheet.SpreadSheet() |> unbox)
5156
Jest.expect(elem.container).toMatchSnapshot()
@@ -74,4 +79,4 @@ Jest.describe("React tests", (fun () ->
7479
let text = elem.getByTestId "text"
7580
Jest.expect(text).toHaveTextContent("3")
7681
))
77-
))
82+
))

0 commit comments

Comments
 (0)