From b9cba49c0db07890e46aa9ea6e53023f1f051a2a Mon Sep 17 00:00:00 2001 From: Walter Korman Date: Fri, 13 Dec 2024 22:26:52 -0800 Subject: [PATCH] chore (examples): Simplify vitest config. (#4094) --- examples/ai-core/README.md | 2 -- examples/ai-core/package.json | 4 ++-- .../{vitest.node.config.js => vitest.config.js} | 0 examples/ai-core/vitest.edge.config.js | 10 ---------- 4 files changed, 2 insertions(+), 14 deletions(-) rename examples/ai-core/{vitest.node.config.js => vitest.config.js} (100%) delete mode 100644 examples/ai-core/vitest.edge.config.js diff --git a/examples/ai-core/README.md b/examples/ai-core/README.md index 0d11d292a6c4..477e592e7665 100644 --- a/examples/ai-core/README.md +++ b/examples/ai-core/README.md @@ -34,8 +34,6 @@ There are a set of end-to-end provider integration tests under `src/e2e`. These The intent is to allow an easy way for an AI SDK developer to smoke-test provider support for a set of common features. Test filtering can allow slicing to a subset of tests. Most of the test cases in these end-to-end tests are also represented in some form as basic example scripts in the appropriate sub-directory of the `src` directory. -The tests run with the `vitest.node.config.js` configuration. - ```sh pnpm run test:e2e:all ``` diff --git a/examples/ai-core/package.json b/examples/ai-core/package.json index 5c7826935cf6..2f672649240c 100644 --- a/examples/ai-core/package.json +++ b/examples/ai-core/package.json @@ -26,8 +26,8 @@ "@google/generative-ai": "0.21.0" }, "scripts": { - "test:e2e:all": "vitest run src/e2e/*.test.ts --config vitest.node.config.js", - "test:file": "vitest run --config vitest.node.config.js", + "test:e2e:all": "vitest run src/e2e/*.test.ts", + "test:file": "vitest run", "type-check": "tsc --noEmit" }, "devDependencies": { diff --git a/examples/ai-core/vitest.node.config.js b/examples/ai-core/vitest.config.js similarity index 100% rename from examples/ai-core/vitest.node.config.js rename to examples/ai-core/vitest.config.js diff --git a/examples/ai-core/vitest.edge.config.js b/examples/ai-core/vitest.edge.config.js deleted file mode 100644 index 700660e913f5..000000000000 --- a/examples/ai-core/vitest.edge.config.js +++ /dev/null @@ -1,10 +0,0 @@ -import { defineConfig } from 'vite'; - -// https://vitejs.dev/config/ -export default defineConfig({ - test: { - environment: 'edge-runtime', - globals: true, - include: ['**/*.test.ts', '**/*.test.tsx'], - }, -});