deno.land / x / esm@v135_2 / test / preact-jsx-runtime / preact.test.tsx

preact.test.tsx
نووسراو ببینە
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import { assert } from "https://deno.land/std@0.180.0/testing/asserts.ts";
import { useState } from "http://localhost:8080/preact@10.14.0/hooks";import render from "http://localhost:8080/preact-render-to-string@6.0.3?deps=preact@10.14.0";
Deno.test("preact-jsx-runtime", () => { const App = () => { const [message] = useState("Hi :)"); return ( <main> <h1>{message}</h1> </main> ); }; const html = render(<App />); assert(html == "<main><h1>Hi :)</h1></main>");});
esm

Version Info

Tagged at
a year ago