mirror of
https://github.com/denoland/std.git
synced 2024-11-21 20:50:22 +00:00
test(yaml): add test for deprecated boolean syntax (#5713)
* initial commit * Update yaml/stringify_test.ts * Update yaml/stringify_test.ts --------- Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com>
This commit is contained in:
parent
75cb7674f1
commit
b929d05156
@ -668,6 +668,13 @@ Deno.test("stringify() handles string", () => {
|
||||
assertEquals(stringify("Hello World"), "Hello World\n");
|
||||
});
|
||||
|
||||
Deno.test("stringify() uses quotes around deprecated boolean notations when `compatMode: true`", () => {
|
||||
assertEquals(stringify("On", { compatMode: true }), "'On'\n");
|
||||
assertEquals(stringify("Off", { compatMode: true }), "'Off'\n");
|
||||
assertEquals(stringify("Yes", { compatMode: true }), "'Yes'\n");
|
||||
assertEquals(stringify("No", { compatMode: true }), "'No'\n");
|
||||
});
|
||||
|
||||
Deno.test("stringify() handles undefined with skipInvalid option", () => {
|
||||
assertEquals(stringify(undefined, { skipInvalid: true }), "");
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user