MtoBeDate
Bun

method

test.Matchers.toBeDate

toBeDate(): void;

Asserts that a value is a Date object.

To check if a date is valid, use toBeValidDate() instead.

expect(new Date()).toBeDate();
expect(new Date(null)).toBeDate();
expect("2020-03-01").not.toBeDate();