deno.land / x / masx200_leetcode_test@10.6.5 / html-entity-parser / test.ts

نووسراو ببینە
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import { assertEquals } from "../deps.ts";import html_Entity_Parser from "./index.ts";
Deno.test("html-entity-parser", () => { const testData: { input: string; output: string }[] = [ { input: "&amp; is an HTML entity but &ambassador; is not.", output: "& is an HTML entity but &ambassador; is not.", }, { input: "and I quote: &quot;...&quot;", output: 'and I quote: "..."', }, { input: "Stay home! Practice on Leetcode :)", output: "Stay home! Practice on Leetcode :)", }, { input: "x &gt; y &amp;&amp; x &lt; y is always false", output: "x > y && x < y is always false", }, { input: "leetcode.com&frasl;problemset&frasl;all", output: "leetcode.com/problemset/all", }, ];
testData.forEach(function ({ input, output }) { assertEquals(html_Entity_Parser(input), output); });});
masx200_leetcode_test

Version Info

Tagged at
a year ago