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

trim events' location, change variable name

This commit is contained in:
Daniel Waxweiler
2022-01-09 12:54:58 +01:00
parent ec12889815
commit 184d5627a3
3 changed files with 14 additions and 8 deletions

View File

@ -53,16 +53,21 @@ test('#formatDate second date is null with short offset name', (t) => {
})
test('#formatLocation both parameters', (t) => {
const date = Formatter.formatLocation({ description: 'a', locality: 'b' })
t.is(date, 'a, b')
const location = Formatter.formatLocation({ description: 'a', locality: 'b' })
t.is(location, 'a, b')
})
test('#formatLocation description only', (t) => {
const date = Formatter.formatLocation({ description: 'a' })
t.is(date, 'a')
const location = Formatter.formatLocation({ description: 'a' })
t.is(location, 'a')
})
test('#formatLocation description with space only', (t) => {
const location = Formatter.formatLocation({ description: ' ' })
t.is(location, '')
})
test('#formatLocation locality only', (t) => {
const date = Formatter.formatLocation({ locality: 'a' })
t.is(date, 'a')
const location = Formatter.formatLocation({ locality: 'a' })
t.is(location, 'a')
})