Spaces:
Running on CPU Upgrade
Running on CPU Upgrade
Download web_app/src/utils/contact.test.ts from CommunityOne/open-navigator: direct link, hf CLI and curl.
- Browser
- Download file 882 Bytes
-
https://huggingface.co/spaces/CommunityOne/open-navigator/resolve/main/web_app/src/utils/contact.test.ts
- Command line
-
hf download hf://spaces/CommunityOne/open-navigator/web_app/src/utils/contact.test.ts
-
curl -L -o contact.test.ts https://huggingface.co/spaces/CommunityOne/open-navigator/resolve/main/web_app/src/utils/contact.test.ts
882 Bytes
| import { describe, expect, it } from 'vitest' | |
| import { CONTACT_EMAIL, closeChatTarget, contactMailto } from './contact' | |
| describe('contactMailto (#860)', () => { | |
| it('is a plain mailto without a subject', () => { | |
| expect(contactMailto()).toBe(`mailto:${CONTACT_EMAIL}`) | |
| expect(contactMailto(' ')).toBe(`mailto:${CONTACT_EMAIL}`) | |
| }) | |
| it('encodes the subject', () => { | |
| expect(contactMailto('Question about Open Navigator & meetings')).toBe( | |
| `mailto:${CONTACT_EMAIL}?subject=Question%20about%20Open%20Navigator%20%26%20meetings`, | |
| ) | |
| }) | |
| }) | |
| describe('closeChatTarget (#879)', () => { | |
| it('goes back when there is in-app history', () => { | |
| expect(closeChatTarget('a1b2c3')).toBe(-1) | |
| }) | |
| it('goes home when the chat was the first page opened', () => { | |
| expect(closeChatTarget('default')).toBe('/') | |
| expect(closeChatTarget('')).toBe('/') | |
| }) | |
| }) | |