deno.land / x / esm@v135_2 / test / preact / preact.test.tsx

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

Version Info

Tagged at
a year ago