Skip to content

Commit

Permalink
null check
Browse files Browse the repository at this point in the history
  • Loading branch information
bmish committed Jul 23, 2023
1 parent 0f606e3 commit f015c1b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rule-tester/flat-rule-tester.js
Original file line number Diff line number Diff line change
Expand Up @@ -1083,7 +1083,7 @@ class FlatRuleTester {
if (item.name) {
assert.ok(typeof item.name === "string", "Optional test case property 'name' must be a string");
}
assert.ok(typeof item.error === "object",
assert.ok(typeof item.error === "object" && item.error !== null,
"Test case property 'error' must be an object");

assert.ok(typeof item.error.name === "string" || typeof item.error.message === "string" || item.error.message instanceof RegExp,
Expand Down

0 comments on commit f015c1b

Please sign in to comment.