Skip to content

No enumerable properties on PlainDate breaks testing #346

@andrewbihl

Description

@andrewbihl

Using Temporal.PlainDate fails in tests like vitest/jest, where you'll see code like

expect(Temporal.PlainDate.from('2000-01-01')).toEqual(Temporal.PlainDate.from('2010-03-05')

pass tests because there are not enumerable properties on PlainDate. As a consequence, the deep equality implementation interprets both objects simply as {}.

This is a concerning footgun.

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