@devries-cameron20 / composio Mirror · read-only
Fork 0

Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.

Mirrored from https://github.com/Camo67/composio.git

Synced Nov 21, 03:37 UTC

next
ts 22 lines 1.17 KB
Raw
1 import { expect, test } from 'bun:test';
2 import { GET } from '../../app/llms.txt/route';
3 import { source, referenceSource, examplesSource, knowledgeBaseSource } from '../../lib/source';
4
5 test('routing map is bounded and covers the current developer decisions', async () => {
6 const text = await GET().text();
7 expect(text.length).toBeLessThan(6000);
8 const primary = text.split('## Optional')[0];
9 for (const path of ['docs', 'docs/agent-setup', 'docs/quickstart', 'docs/agent-plugins',
10 'docs/authentication', 'docs/configuring-sessions', 'kb']) {
11 expect(primary).toContain(`https://docs.composio.dev/${path}.md`);
12 }
13 expect(text).toContain('[Complete documentation index](https://docs.composio.dev/llms-index.txt)');
14 expect(text).not.toMatch(/^- https?:/m);
15 expect(text).toContain('REST v3.0 is legacy');
16 const pages = new Set([source, referenceSource, examplesSource, knowledgeBaseSource]
17 .flatMap(collection => collection.getPages().map(page => page.url)));
18 pages.add('/docs/changelog');
19 for (const match of text.matchAll(/\]\(https:\/\/docs\.composio\.dev([^)]*)\.md\)/g)) {
20 expect(pages.has(match[1]), `unresolved route: ${match[1]}`).toBe(true);
21 }
22 });