From 065d8771adfae6aa75cdd367741468c823fbae4a Mon Sep 17 00:00:00 2001 From: Nayeem Rahman Date: Fri, 21 Apr 2023 14:32:37 +0100 Subject: [PATCH] fix(test): allow explicit undefined for boolean test options (#18786) Fixes #18784. --- cli/ops/testing.rs | 2 ++ cli/tests/unit/testing_test.ts | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/cli/ops/testing.rs b/cli/ops/testing.rs index e36d7e6114..3f9ade7c9e 100644 --- a/cli/ops/testing.rs +++ b/cli/ops/testing.rs @@ -100,7 +100,9 @@ struct TestInfo<'s> { #[serde(rename = "fn")] function: serde_v8::Value<'s>, name: String, + #[serde(default)] ignore: bool, + #[serde(default)] only: bool, location: TestLocation, } diff --git a/cli/tests/unit/testing_test.ts b/cli/tests/unit/testing_test.ts index 4e28d545c5..52e3baa133 100644 --- a/cli/tests/unit/testing_test.ts +++ b/cli/tests/unit/testing_test.ts @@ -147,3 +147,8 @@ Deno.test(async function parentOnTextContext(t1) { }); }); }); + +Deno.test("explicit undefined for boolean options", { + ignore: undefined, + only: undefined, +}, () => {});