mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
Fix backend test 'run two hours forward to be in the next month in UTC' > 'has the clock set correctly' by adding a '0' in front of the month if '< 10'
This commit is contained in:
parent
b640121958
commit
347e937d6b
@ -183,8 +183,10 @@ describe('util/creation', () => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
it('has the clock set correctly', () => {
|
it('has the clock set correctly', () => {
|
||||||
|
const targetMonth = targetDate.getMonth() + 1
|
||||||
|
const targetMonthString = (targetMonth < 10 ? '0' : '') + String(targetMonth)
|
||||||
expect(new Date().toISOString()).toContain(
|
expect(new Date().toISOString()).toContain(
|
||||||
`${targetDate.getFullYear()}-${targetDate.getMonth() + 1}-${targetDate.getDate()}T23:`,
|
`${targetDate.getFullYear()}-${targetMonthString}-${targetDate.getDate()}T23:`,
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user