test(yaml): add undefined array entry with skipInvalid and flowLevel options test (#5828)

initial commit
This commit is contained in:
Tim Reichen 2024-08-27 01:27:21 +02:00 committed by GitHub
parent 78bb214da3
commit 95ad45b118
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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",