1
0
mirror of https://github.com/dwaxweiler/connector-mobilizon synced 2025-06-05 21:59:25 +02:00

Fix Invalid DateTime on event end time being null

This commit is contained in:
Daniel Waxweiler
2021-12-23 17:16:03 +01:00
parent 688868cbe9
commit a287d93b9f
3 changed files with 34 additions and 13 deletions

View File

@ -32,7 +32,24 @@ test('#formatDate two dates with short offset name', (t) => {
end: '2021-04-16T15:30:00Z',
isShortOffsetNameShown: true,
})
t.is(date, '15/04/2021 10:30 (UTC) - 16/04/2021 15:30 (UTC)')
t.is(date, '15/04/2021 10:30 - 16/04/2021 15:30 (UTC)')
})
test('#formatDate second date is null', (t) => {
const date = Formatter.formatDate({
start: '2021-04-15T10:30:00Z',
end: null,
})
t.is(date, '15/04/2021 10:30')
})
test('#formatDate second date is null with short offset name', (t) => {
const date = Formatter.formatDate({
start: '2021-04-15T10:30:00Z',
end: null,
isShortOffsetNameShown: true,
})
t.is(date, '15/04/2021 10:30 (UTC)')
})
test('#formatLocation both parameters', (t) => {