4
5
## What's Here
6
7
-| File/Directory | Purpose |
8
-| ----------------- | ------------------------------------------------------ |
9
-| `src/` | TypeScript utilities (e2e runner, config, types) |
10
-| `scripts/` | Docker build and cleanup scripts |
11
-| `Dockerfile.node` | Multi-stage Dockerfile for Node.js test environments |
12
-| `Dockerfile.deno` | Dockerfile for Deno test environments |
13
-| `Dockerfile.cli` | Scratch Dockerfile for CLI test environments |
7
+| File/Directory | Purpose |
8
+| ----------------- | ---------------------------------------------------- |
9
+| `src/` | TypeScript utilities (e2e runner, config, types) |
10
+| `scripts/` | Docker build and cleanup scripts |
11
+| `Dockerfile.node` | Multi-stage Dockerfile for Node.js test environments |
12
+| `Dockerfile.deno` | Dockerfile for Deno test environments |
13
+| `Dockerfile.cli` | Scratch Dockerfile for CLI test environments |
14
15
## API
16
25
26
e2e(import.meta.url, {
27
versions: {
28
- node: ['20.18.0', '20.19.0', '22.12.0'], // optional, defaults to .nvmrc
29
- deno: ['2.6.7'], // optional, defaults to .dvmrc
30
- cli: ['current'], // optional, defaults to CLI package.json version
28
+ node: ['22.22.3', '24.16.0', '25.9.0'], // optional, defaults to mise.toml
29
+ deno: ['2.6.7'], // optional, defaults to mise.toml
30
+ cli: ['current'], // optional, defaults to CLI package.json version
31
},
32
- env: { MY_VAR: 'value' }, // optional env vars
32
+ env: { MY_VAR: 'value' }, // optional env vars
33
defineTests: ({ runtime, runCmd, runFixture }) => {
34
let result: E2ETestResult;
35
50
51
Configuration object passed to `e2e()`:
52
53
-| Property | Type | Description |
54
-| -------------- | ------------------------------------- | ---------------------------------------------------------------- |
55
-| `versions` | `RuntimeVersions` | Runtime versions to test. See RuntimeVersions below |
56
-| `env` | `Record<string, string \| undefined>` | Environment variables for Docker. Validated at startup |
57
-| `usesFixtures` | `boolean` | When true, sets cwd to `{testDir}/fixtures`. Default: `false` |
58
-| `defineTests` | `(ctx: DefineTestsContext) => void` | Callback to define tests using bun:test primitives |
53
+| Property | Type | Description |
54
+| -------------- | ------------------------------------- | ------------------------------------------------------------- |
55
+| `versions` | `RuntimeVersions` | Runtime versions to test. See RuntimeVersions below |
56
+| `env` | `Record<string, string \| undefined>` | Environment variables for Docker. Validated at startup |
57
+| `usesFixtures` | `boolean` | When true, sets cwd to `{testDir}/fixtures`. Default: `false` |
58
+| `defineTests` | `(ctx: DefineTestsContext) => void` | Callback to define tests using bun:test primitives |
59
60
### `RuntimeVersions`
61
62
-| Property | Type | Description |
63
-| -------- | -------------------------------- | ------------------------------------------------ |
64
-| `node` | `readonly NodeVersionFromUser[]` | Node.js versions. Defaults to `.nvmrc` |
65
-| `deno` | `readonly DenoVersionFromUser[]` | Deno versions. Defaults to `.dvmrc` |
66
-| `cli` | `readonly CliVersionFromUser[]` | CLI versions. Defaults to CLI package.json |
62
+| Property | Type | Description |
63
+| -------- | -------------------------------- | ------------------------------------------ |
64
+| `node` | `readonly NodeVersionFromUser[]` | Node.js versions. Defaults to `mise.toml` |
65
+| `deno` | `readonly DenoVersionFromUser[]` | Deno versions. Defaults to `mise.toml` |
66
+| `cli` | `readonly CliVersionFromUser[]` | CLI versions. Defaults to CLI package.json |
67
68
### `DefineTestsContext`
69
70
The context passed to the `defineTests` callback:
71
72
-| Property | Type/Signature | Description |
73
-| ------------ | ---------------------------------------------------------------- | ---------------------------------------------- |
74
-| `runtime` | `'node' \| 'deno' \| 'cli'` | Current runtime being tested |
75
-| `runCmd` | `(command: string) => Promise<E2ETestResult>` | Run arbitrary command in Docker container |
76
-| `runFixture` | `(options: RunFixtureOptions) => Promise<E2ETestResult \| E2ETestResultWithSetup>` | Run fixture with optional setup phase |
72
+| Property | Type/Signature | Description |
73
+| ------------ | ---------------------------------------------------------------------------------- | ----------------------------------------- |
74
+| `runtime` | `'node' \| 'deno' \| 'cli'` | Current runtime being tested |
75
+| `runCmd` | `(command: string) => Promise<E2ETestResult>` | Run arbitrary command in Docker container |
76
+| `runFixture` | `(options: RunFixtureOptions) => Promise<E2ETestResult \| E2ETestResultWithSetup>` | Run fixture with optional setup phase |
77
78
### `RunFixtureOptions`
79
80
Options for `runFixture()`:
81
82
-| Property | Type | Description |
83
-| ---------- | -------- | --------------------------------------------------------------------- |
84
-| `filename` | `string` | Fixture file path relative to cwd (e.g., `'index.mjs'`) |
85
-| `setup` | `string` | Optional setup command (e.g., `'npm install'`). Enables volume mode |
82
+| Property | Type | Description |
83
+| ---------- | -------- | ------------------------------------------------------------------- |
84
+| `filename` | `string` | Fixture file path relative to cwd (e.g., `'index.mjs'`) |
85
+| `setup` | `string` | Optional setup command (e.g., `'npm install'`). Enables volume mode |
86
87
**Behavior:**
88
98
filename: 'index.mjs',
99
setup: 'npm install --legacy-peer-deps',
100
});
101
-expect(result.setup.exitCode).toBe(0); // Check setup phase
102
-expect(result.exitCode).toBe(0); // Check fixture phase
101
+expect(result.setup.exitCode).toBe(0); // Check setup phase
102
+expect(result.exitCode).toBe(0); // Check fixture phase
103
```
104
105
### `E2ETestResult`
108
109
```typescript
110
interface E2ETestResult {
111
- exitCode: number; // Exit code from the command (0 = success)
112
- stdout: string; // Captured stdout
113
- stderr: string; // Captured stderr
111
+ exitCode: number; // Exit code from the command (0 = success)
112
+ stdout: string; // Captured stdout
113
+ stderr: string; // Captured stderr
114
}
115
```
116
162
```typescript
163
import { TIMEOUTS } from '@e2e-tests/utils/const';
164
165
-it('calls LLM', async () => {
166
- // test code
167
-}, { timeout: TIMEOUTS.LLM_SHORT });
165
+it(
166
+ 'calls LLM',
167
+ async () => {
168
+ // test code
169
+ },
170
+ { timeout: TIMEOUTS.LLM_SHORT }
171
+);
172
```
173
174
| Constant | Value | Use Case |
186
187
1. **`COMPOSIO_E2E_NODE_VERSION` env var** (highest priority): Use `[env_value]`
188
2. **`config.versions.node`**: Use the provided array
185
-3. **Default**: Use version from `.nvmrc` file
189
+3. **Default**: Use version from `mise.toml` file
190
191
### Well-Known Node Versions
192
193
The following versions are pre-defined in `const.ts`:
194
191
-- `20.18.0`
192
-- `20.19.0`
193
-- `22.12.0`
194
-- `current` (resolves to `.nvmrc` version)
195
+- `22.22.3`
196
+- `24.16.0`
197
+- `25.9.0`
198
+- `current` (resolves to `mise.toml` version)
199
200
### Deno Version Resolution
201
203
204
1. **`COMPOSIO_E2E_DENO_VERSION` env var** (highest priority): Use `[env_value]`
205
2. **`config.versions.deno`**: Use the provided array
202
-3. **Default**: Use version from `.dvmrc` file
206
+3. **Default**: Use version from `mise.toml` file
207
208
### Well-Known Deno Versions
209
210
The following versions are pre-defined in `const.ts`:
211
212
- `2.6.7`
209
-- `current` (resolves to `.dvmrc` version)
213
+- `current` (resolves to `mise.toml` version)
214
215
### CLI Version Resolution
216
254
beforeAll(async () => {
255
// Both commands run in fixtures/ directory
256
result = await runFixture({
253
- filename: 'index.mjs', // Resolves to fixtures/index.mjs
254
- setup: 'npm install', // Runs in fixtures/
257
+ filename: 'index.mjs', // Resolves to fixtures/index.mjs
258
+ setup: 'npm install', // Runs in fixtures/
259
});
260
}, TIMEOUTS.FIXTURE);
261
},
281
E2E Test: openai-zod4-compat
282
Started: 2026-01-30T12:18:42.000Z
283
Test file: ts/e2e-tests/runtimes/node/openai-zod4-compat/e2e.test.ts
280
-Node versions: 20.19.0, 22.12.0
284
+Runtime versions: Node.js 22.22.3, Node.js 24.16.0, Node.js 25.9.0
285
================================================================================
286
287
################################################################################
284
-### Node.js 20.19.0
288
+### Node.js 22.22.3
289
################################################################################
286
-Image: composio-e2e-node:20.19.0
290
+Image: composio-e2e-node:22.22.3
291
292
--- Phase 1/2: setup ---
289
-Container: e2e-openai-zod4-compat-20-19-0-1769775520382-setup
293
+Container: e2e-openai-zod4-compat-22-22-3-1769775520382-setup
294
Command: npm install --legacy-peer-deps
295
Duration: 2.55s
296
Exit Code: 0 (success)
302
(empty)
303
304
--- Phase 2/2: fixture ---
301
-Container: e2e-openai-zod4-compat-20-19-0-1769775520382-fixture
305
+Container: e2e-openai-zod4-compat-22-22-3-1769775520382-fixture
306
Command: node index.mjs
307
Duration: 0.56s
308
Exit Code: 0 (success)
315
[stderr]
316
(empty)
317
314
-################################################################################
315
-### Node.js 22.12.0 (SKIPPED)
316
-################################################################################
317
-Reason: Not selected via COMPOSIO_E2E_NODE_VERSION
318
-
318
================================================================================
319
Summary
320
================================================================================
322
-Node.js 20.19.0: PASS (2 phases, 3.11s total)
323
-Node.js 22.12.0: SKIPPED
321
+Node.js 22.22.3: PASS (2 phases, 3.11s total)
322
+Node.js 24.16.0: PASS (2 phases, 3.09s total)
323
+Node.js 25.9.0: PASS (2 phases, 3.08s total)
324
325
Finished: 2026-01-30T12:18:46.500Z
326
Total duration: 4.50s