Download lib/api/index.test.ts from ASEM12345/rsshub: direct link, hf CLI and curl.
- Browser
- Download file 410 Bytes
-
https://huggingface.co/spaces/ASEM12345/rsshub/resolve/main/lib/api/index.test.ts
- Command line
-
hf download hf://spaces/ASEM12345/rsshub/lib/api/index.test.ts
-
curl -L -o index.test.ts https://huggingface.co/spaces/ASEM12345/rsshub/resolve/main/lib/api/index.test.ts
410 Bytes
| import { describe, expect, it } from 'vitest'; | |
| import api from '@/api'; | |
| describe('api index', () => { | |
| it('serves openapi document', async () => { | |
| const response = await api.request('/openapi.json'); | |
| expect(response.status).toBe(200); | |
| const data = await response.json(); | |
| expect(data.openapi).toBe('3.1.0'); | |
| expect(data.info?.title).toBe('RSSHub API'); | |
| }); | |
| }); | |