diff --git a/yaml/stringify_test.ts b/yaml/stringify_test.ts index 8959604dc1c7..66cc834006b6 100644 --- a/yaml/stringify_test.ts +++ b/yaml/stringify_test.ts @@ -667,3 +667,7 @@ Oren: Ben-Kiki Deno.test("stringify() handles string", () => { assertEquals(stringify("Hello World"), "Hello World\n"); }); + +Deno.test("stringify() handles undefined with skipInvalid option", () => { + assertEquals(stringify(undefined, { skipInvalid: true }), ""); +});