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
| 1 | import { expect, test } from 'bun:test'; |
| 2 | import { fetchPage } from './helpers'; |
| 3 | |
| 4 | test('an agent can discover the changelog and read a dated release', async () => { |
| 5 | const quickstart = await fetchPage('/docs/quickstart.md'); |
| 6 | expect(quickstart.status).toBe(200); |
| 7 | expect(await quickstart.text()).toContain('https://docs.composio.dev/docs/changelog.md'); |
| 8 | const index = await fetchPage('/docs/changelog.md'); |
| 9 | expect(index.status).toBe(200); |
| 10 | expect(index.headers.get('content-type')).toContain('text/markdown'); |
| 11 | const text = await index.text(); |
| 12 | const dated = text.match(/https:\/\/docs\.composio\.dev(\/docs\/changelog\/\d{4}\/\d{2}\/\d{2}\.md)/); |
| 13 | expect(dated).not.toBeNull(); |
| 14 | const release = await fetchPage(dated![1]); |
| 15 | expect(release.status).toBe(200); |
| 16 | expect(release.headers.get('content-type')).toContain('text/markdown'); |
| 17 | expect((await release.text()).length).toBeGreaterThan(200); |
| 18 | const mdx = await fetchPage(dated![1].replace(/\.md$/, '.mdx')); |
| 19 | expect(mdx.status).toBe(200); |
| 20 | expect(mdx.headers.get('content-type')).toContain('text/markdown'); |
| 21 | }); |