Spaces:
Running on CPU Upgrade
Running on CPU Upgrade
File size: 549 Bytes
d15f07c | 1 2 3 4 5 6 7 8 9 10 11 12 13 | import { describe, expect, it } from 'vitest'
import { companySearchTerm } from './companySearchTerm'
describe('companySearchTerm', () => {
it('uses the brand marked in the newest quote', () => {
expect(companySearchTerm('Expedia Group', 'I have a rental property <mark>VRBO</mark> two houses down')).toBe('VRBO')
})
it('falls back to the company name without a quote', () => {
expect(companySearchTerm('Booking Holdings', null)).toBe('Booking Holdings')
expect(companySearchTerm('Airbnb', 'no mark here')).toBe('Airbnb')
})
})
|