deno.land / std@0.167.0 / encoding / front_matter / any_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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
// Copyright 2018-2022 the Deno authors. All rights reserved. MIT license.
import extract, { Format, test } from "./any.ts";import { runExtractJSONTests, runExtractTOMLTests, runExtractTypeErrorTests, runExtractYAMLTests1, runExtractYAMLTests2, runTestInvalidInputTests, runTestValidInputTests,} from "./_test_utils.ts";
// YAML //
Deno.test("[ANY/YAML] test valid input true", () => { runTestValidInputTests(Format.YAML, test);});
Deno.test("[ANY/YAML] test invalid input false", () => { runTestInvalidInputTests(Format.YAML, test);});
Deno.test("[ANY/YAML] extract type error on invalid input", () => { runExtractTypeErrorTests(Format.YAML, extract);});
Deno.test("[ANY/YAML] parse yaml delineate by `---`", async () => { await runExtractYAMLTests1(extract);});
Deno.test("[ANY/YAML] parse yaml delineate by `---yaml`", async () => { await runExtractYAMLTests2(extract);});
// JSON //
Deno.test("[ANY/JSON] test valid input true", () => { runTestValidInputTests(Format.JSON, test);});
Deno.test("[ANY/JSON] test invalid input false", () => { runTestInvalidInputTests(Format.JSON, test);});
Deno.test("[ANY/JSON] extract type error on invalid input", () => { runExtractTypeErrorTests(Format.JSON, extract);});
Deno.test("[ANY/JSON] parse json delineate by ---json", async () => { await runExtractJSONTests(extract);});
// TOML //
Deno.test("[ANY/TOML] test valid input true", () => { runTestValidInputTests(Format.TOML, test);});
Deno.test("[ANY/TOML] test invalid input false", () => { runTestInvalidInputTests(Format.TOML, test);});
Deno.test("[ANY/TOML] extract type error on invalid input", () => { runExtractTypeErrorTests(Format.TOML, extract);});
Deno.test("[ANY/TOML] parse toml delineate by ---toml", async () => { await runExtractTOMLTests(extract);});
std

Version Info

Tagged at
a year ago