Skip to content

Add null and boolean test cases to minProperties and propertyNames #856

@Anshikakalpana

Description

@Anshikakalpana

Following #827 , which added null and boolean tests to required to guard against the JavaScript typeof null === "object" bug, I noticed minProperties and propertyNames have the same gap.
Both are object-only keywords. A buggy JS implementation checking typeof data === "object" would incorrectly apply them to null. The existing 12 test doesn't catch this since typeof 12 === "number" correctly bypasses that check — only null triggers the false positive.
Proposed addition to both files:

{ "description": "ignores null", "data": null, "valid": true }, { "description": "ignores booleans", "data": true, "valid": true }

Happy to submit a PR across all affected drafts if this is accepted.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions