also fix backend month test

This commit is contained in:
Ulf Gebhardt 2023-01-03 12:41:42 +01:00
parent 77bfa5b5ef
commit f83b9a762c
Signed by: ulfgebhardt
GPG Key ID: DA6B843E748679C9

View File

@ -183,8 +183,10 @@ describe('util/creation', () => {
})
it('has the clock set correctly', () => {
const targetMonthString =
(targetDate.getMonth() + 1 < 10 ? '0' : '') + String(targetDate.getMonth() + 1)
expect(new Date().toISOString()).toContain(
`${targetDate.getFullYear()}-${targetDate.getMonth() + 1}-${targetDate.getDate()}T23:`,
`${targetDate.getFullYear()}-${targetMonthString}-${targetDate.getDate()}T23:`,
)
})