Skip to content

Commit d92d353

Browse files
committed
[test] add e2e test
1 parent 077bf96 commit d92d353

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

test/fragment.test.art

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
import {unitt}!
2+
3+
import {src/html}!
4+
5+
test "E2E testing fragment against html" [
6+
expect: {!html
7+
<!DOCTYPE html>
8+
<html>
9+
<head>
10+
<title>Hello</title>
11+
<meta name="twitter:card"/>
12+
</head>
13+
<body>
14+
<h1>Title</h1>
15+
<input name="user" type="username"/>
16+
</body>
17+
</html>
18+
}
19+
20+
result: fragment [
21+
\html [
22+
\head [
23+
\title "Hello"
24+
\meta #[name: "twitter:card"]
25+
]
26+
27+
\body [
28+
\h1 "Title"
29+
\input #[name: "user" type: "username"]
30+
]
31+
]]
32+
33+
assert -> expect = result
34+
]
35+

0 commit comments

Comments
 (0)