diff --git a/yaml/stringify_test.ts b/yaml/stringify_test.ts index e3e6b9dbd..b93476685 100644 --- a/yaml/stringify_test.ts +++ b/yaml/stringify_test.ts @@ -707,6 +707,20 @@ Deno.test("stringify() handles duplicate array references", () => { ); }); +Deno.test({ + name: + "stringify() handles undefined array entry with skipInvalid and flowLevel option", + fn() { + assertEquals( + stringify({ foo: [undefined] }, { + flowLevel: 1, + skipInvalid: true, + }), + `foo: []\n`, + ); + }, +}); + Deno.test({ name: "stringify() handles undefined object entry with skipInvalid and flowLevel option",