summaryrefslogtreecommitdiff
path: root/cli
diff options
context:
space:
mode:
authorNayeem Rahman <nayeemrmn99@gmail.com>2023-04-21 14:32:37 +0100
committerGitHub <noreply@github.com>2023-04-21 15:32:37 +0200
commit065d8771adfae6aa75cdd367741468c823fbae4a (patch)
tree19dfe56c9536d6ca563d1b189345231338a84801 /cli
parent1d447cb7c3295941be85a05b455f45d89e119667 (diff)
fix(test): allow explicit undefined for boolean test options (#18786)
Fixes #18784.
Diffstat (limited to 'cli')
-rw-r--r--cli/ops/testing.rs2
-rw-r--r--cli/tests/unit/testing_test.ts5
2 files changed, 7 insertions, 0 deletions
diff --git a/cli/ops/testing.rs b/cli/ops/testing.rs
index e36d7e611..3f9ade7c9 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 4e28d545c..52e3baa13 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,
+}, () => {});