SearchableInput.spec.js whitespace replacement

This commit is contained in:
Ulf Gebhardt 2021-04-24 13:51:32 +02:00
parent 6e5e15097e
commit 52306aeed4
No known key found for this signature in database
GPG Key ID: 81308EFE29ABFEBD

View File

@ -120,5 +120,17 @@ describe('SearchableInput.vue', () => {
query: { search: 'ab' },
})
})
it('replaces irregular whitespace with a single space', async () => {
select.element.value = 'peter \
lustig'
select.trigger('input')
select.trigger('keyup.enter')
expect(mocks.$router.push).toHaveBeenCalledWith({
path: '/search/search-results',
query: { search: 'peter lustig' },
})
})
})
})