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 { defineConfig } from 'vitest/config'; |
| 2 | |
| 3 | // Exclude e2e directories - they are separate packages with their own test commands |
| 4 | const exclude = ['**/node_modules/**', '**/dist/**', '**/test/e2e/**']; |
| 5 | |
| 6 | /** Only the zod 3.25 project runs it: it asserts the `/v4` entry refuses that copy. */ |
| 7 | const floorRejection = 'test/v4-floor.test.ts'; |
| 8 | /** The `/v4` entry cannot load below the floor, so the suites that import it skip the zod 3.25 project. */ |
| 9 | const v4Only = ['test/v4/**', 'test/types.test.ts']; |
| 10 | /** Pinned against the package's own zod copy; older releases render JSON Schema differently. */ |
| 11 | const v4Snapshot = 'test/v4/corpus-snapshot.test.ts'; |
| 12 | |
| 13 | /** Routes every `zod/v3` and `zod/v4` import, in sources and tests alike, to one aliased copy. */ |
| 14 | const zodCopy = (alias: string) => ({ |
| 15 | alias: [{ find: /^zod\/(v3|v4)(\/.*)?$/, replacement: `${alias}/$1$2` }], |
| 16 | }); |
| 17 | |
| 18 | export default defineConfig({ |
| 19 | test: { |
| 20 | exclude, |
| 21 | projects: [ |
| 22 | { |
| 23 | extends: true, |
| 24 | test: { name: 'zod-4.5', exclude: [...exclude, floorRejection] }, |
| 25 | }, |
| 26 | { |
| 27 | extends: true, |
| 28 | test: { name: 'zod-4.1.13', exclude: [...exclude, floorRejection, v4Snapshot] }, |
| 29 | resolve: zodCopy('zod-floor'), |
| 30 | }, |
| 31 | { |
| 32 | extends: true, |
| 33 | test: { name: 'zod-3.25', exclude: [...exclude, ...v4Only] }, |
| 34 | resolve: zodCopy('zod-3-25'), |
| 35 | }, |
| 36 | ], |
| 37 | }, |
| 38 | }); |