ts/e2e-tests/runtimes/cloudflare/cf-workers-basic/README.md
Verifies that @composio/core runs correctly in the Cloudflare Workers runtime environment.
Cloudflare Workers use a non-Node.js runtime (workerd) with:
This suite ensures @composio/core works in this constrained environment without relying on Node.js-specific features.
| Test | Description |
|---|---|
| Import & instantiation | Composio class imports and instantiates without runtime errors |
| Provider setup | OpenAIProvider initializes correctly |
| Tool retrieval | getTools() returns valid tool definitions |
| Live API call | Execute a real HackerNews action to verify end-to-end functionality |
| Uses LLMs? | ❌ |
wrangler: Cloudflare's CLI that runs a local workerd instance@cloudflare/vitest-pool-workers: Runs Vitest tests inside the Workers runtime, not Node.jsThis combination provides true runtime isolation—tests execute in the same environment as production Workers.
.env.example to .env and add your COMPOSIO_API_KEYpnpm install# Via pnpm (recommended)
pnpm test:e2e
| File | Purpose |
|---|---|
wrangler.jsonc | Worker configuration (bindings, compatibility flags) |
vitest.config.mts | Vitest setup with Workers pool and env bindings |