@devries-cameron20 / composio Mirror · read-only / commits / 1d2ee8f18
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 22, 09:30 UTC

docs(e2e): update examples and TIMEOUTS table for FIXTURE constant

Update README examples, _utils/README TIMEOUTS table, and JSDoc comments to reference TIMEOUTS.FIXTURE for fixture beforeAll hooks.

jkomyno committed Feb 17, 2026 at 12:39 UTC 1d2ee8f18adea3110eb2d3e8757c117fec9b55db
4 files changed +20 -13
ts/e2e-tests/README.md
+6 -3
@@ -94,6 +94,7 @@ pnpm test:e2e:cloudflare
94
95 ```typescript
96 import { e2e, type E2ETestResult } from '@e2e-tests/utils';
97 +import { TIMEOUTS } from '@e2e-tests/utils/const';
98 import { describe, it, expect, beforeAll } from 'bun:test';
99
100 e2e(import.meta.url, {
@@ -106,7 +107,7 @@ e2e(import.meta.url, {
107
108 beforeAll(async () => {
109 result = await runFixture({ filename: 'fixtures/test.mjs' });
109 - });
110 + }, TIMEOUTS.FIXTURE);
111
112 describe('output', () => {
113 it('exits successfully', () => {
@@ -132,6 +133,7 @@ e2e(import.meta.url, {
133
134 ```typescript
135 import { e2e, type E2ETestResult } from '@e2e-tests/utils';
136 +import { TIMEOUTS } from '@e2e-tests/utils/const';
137 import { describe, it, expect, beforeAll } from 'bun:test';
138
139 e2e(import.meta.url, {
@@ -144,7 +146,7 @@ e2e(import.meta.url, {
146
147 beforeAll(async () => {
148 result = await runFixture({ filename: 'test.ts' });
147 - });
149 + }, TIMEOUTS.FIXTURE);
150
151 describe('output', () => {
152 it('exits successfully', () => {
@@ -167,6 +169,7 @@ For tests that need to install npm packages at runtime, use `usesFixtures: true`
169
170 ```typescript
171 import { e2e, type E2ETestResultWithSetup } from '@e2e-tests/utils';
172 +import { TIMEOUTS } from '@e2e-tests/utils/const';
173 import { describe, it, expect, beforeAll } from 'bun:test';
174
175 e2e(import.meta.url, {
@@ -181,7 +184,7 @@ e2e(import.meta.url, {
184 filename: 'index.mjs',
185 setup: 'npm install --legacy-peer-deps', // Runs before fixture
186 });
184 - });
187 + }, TIMEOUTS.FIXTURE);
188
189 describe('setup', () => {
190 it('npm install completes successfully', () => {
ts/e2e-tests/_utils/README.md
+11 -7
@@ -19,6 +19,7 @@ The main entry point for e2e tests. Automatically infers the working directory a
19
20 ```typescript
21 import { e2e, type E2ETestResult } from '@e2e-tests/utils';
22 +import { TIMEOUTS } from '@e2e-tests/utils/const';
23 import { describe, it, expect, beforeAll } from 'bun:test';
24
25 e2e(import.meta.url, {
@@ -32,7 +33,7 @@ e2e(import.meta.url, {
33
34 beforeAll(async () => {
35 result = await runFixture({ filename: 'fixtures/test.mjs' });
35 - });
36 + }, TIMEOUTS.FIXTURE);
37
38 describe('output', () => {
39 it('exits successfully', () => {
@@ -148,11 +149,12 @@ it('calls LLM', async () => {
149 }, { timeout: TIMEOUTS.LLM_SHORT });
150 ```
151
151 -| Constant | Value | Use Case |
152 -| ----------- | --------- | ---------------------------------- |
153 -| `DEFAULT` | `5_000` | Standard test operations |
154 -| `LLM_SHORT` | `15_000` | Quick LLM calls |
155 -| `LLM_LONG` | `60_000` | Complex LLM operations |
152 +| Constant | Value | Use Case |
153 +| ----------- | --------- | ------------------------------------------ |
154 +| `DEFAULT` | `5_000` | Standard test operations |
155 +| `FIXTURE` | `15_000` | `beforeAll` hooks that call `runFixture()` |
156 +| `LLM_SHORT` | `30_000` | Quick LLM calls |
157 +| `LLM_LONG` | `60_000` | Complex LLM operations |
158
159 ## Version Resolution
160
@@ -210,6 +212,8 @@ When `usesFixtures: true` is set:
212 Use this for tests that have their own `package.json` and need to run `npm install`:
213
214 ```typescript
215 +import { TIMEOUTS } from '@e2e-tests/utils/const';
216 +
217 e2e(import.meta.url, {
218 usesFixtures: true,
219 defineTests: ({ runFixture }) => {
@@ -219,7 +223,7 @@ e2e(import.meta.url, {
223 filename: 'index.mjs', // Resolves to fixtures/index.mjs
224 setup: 'npm install', // Runs in fixtures/
225 });
222 - });
226 + }, TIMEOUTS.FIXTURE);
227 },
228 });
229 ```
ts/e2e-tests/_utils/src/e2e.ts
+2 -2
@@ -58,8 +58,8 @@ function inferCwd(importMetaUrl: string, repoRoot: string): string {
58 * let result: E2ETestResult;
59 *
60 * beforeAll(async () => {
61 - * result = await runFixture('fixtures/test.mjs');
62 - * }, 300_000);
61 + * result = await runFixture({ filename: 'fixtures/test.mjs' });
62 + * }, TIMEOUTS.FIXTURE);
63 *
64 * describe('output', () => {
65 * it('exits successfully', () => {
ts/e2e-tests/_utils/src/types.ts
+1 -1
@@ -174,7 +174,7 @@ export interface E2EConfig {
174 *
175 * beforeAll(async () => {
176 * result = await runFixture({ filename: 'fixtures/test.mjs' });
177 - * }, 300_000);
177 + * }, TIMEOUTS.FIXTURE);
178 *
179 * describe('output', () => {
180 * it('exits successfully', () => {