Spaces:
Running on CPU Upgrade
Running on CPU Upgrade
Download web_app/src/utils/companySearchTerm.test.ts from CommunityOne/open-navigator: direct link, hf CLI and curl.
- Browser
- Download file 549 Bytes
-
https://huggingface.co/spaces/CommunityOne/open-navigator/resolve/main/web_app/src/utils/companySearchTerm.test.ts
- Command line
-
hf download hf://spaces/CommunityOne/open-navigator/web_app/src/utils/companySearchTerm.test.ts
-
curl -L -o companySearchTerm.test.ts https://huggingface.co/spaces/CommunityOne/open-navigator/resolve/main/web_app/src/utils/companySearchTerm.test.ts
549 Bytes
| 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') | |
| }) | |
| }) | |