From 5a256b69a13e29d0311103e5da394ef7fb15e962 Mon Sep 17 00:00:00 2001 From: Artem Zakharchenko Date: Mon, 21 Oct 2024 16:19:47 +0200 Subject: [PATCH] add callout to include timezone --- exercises/02.test-structure/04.solution.hooks/README.mdx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/exercises/02.test-structure/04.solution.hooks/README.mdx b/exercises/02.test-structure/04.solution.hooks/README.mdx index 20bdb05..15227e4 100644 --- a/exercises/02.test-structure/04.solution.hooks/README.mdx +++ b/exercises/02.test-structure/04.solution.hooks/README.mdx @@ -20,6 +20,8 @@ Then, I go to the `greet.test.ts` and add the `beforeAll()` hook that patches th +I recommend providing an entire UTC date, including an explicit timezone, as the value of the mocked date to have a resilient test setup: `new OriginalDate('2024-01-01 00:00:00.000Z')` + Similarly, I make sure to clean up this `Date` mock in the `afterAll()` hook: