From cde1275a0d9d84ae3685cc908e4e27f1e2feed5c Mon Sep 17 00:00:00 2001 From: lihbr Date: Thu, 20 Jun 2024 15:26:56 +0200 Subject: [PATCH] test: make date test timezone insensitive --- test/value-date.test.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/value-date.test.ts b/test/value-date.test.ts index e0b40a8..88b9ff7 100644 --- a/test/value-date.test.ts +++ b/test/value-date.test.ts @@ -22,9 +22,10 @@ test("can be configured to return an empty value", (t) => { test("can be configured to return a date after and before given dates", (t) => { const actual = value.date({ seed: t.title, - after: new Date(1984, 0, 1), - before: new Date(1984, 0, 3), + after: new Date("1984-01-01T00:00:00.000Z"), + before: new Date("1984-01-01T00:00:00.000Z"), }); + // Interval is [after, before] t.is(actual, "1984-01-01"); });