mirror of
https://github.com/cloudflare/cloudflare-docs.git
synced 2026-01-16 23:11:06 +00:00
35 lines
704 B
TypeScript
35 lines
704 B
TypeScript
import { defineWorkspace, defineProject } from "vitest/config";
|
|
import { defineWorkersProject } from "@cloudflare/vitest-pool-workers/config";
|
|
|
|
import tsconfigPaths from "vite-tsconfig-paths";
|
|
|
|
const workspace = defineWorkspace([
|
|
defineWorkersProject({
|
|
test: {
|
|
name: "Workers",
|
|
include: ["**/*.worker.test.ts"],
|
|
deps: {
|
|
optimizer: {
|
|
ssr: {
|
|
enabled: true,
|
|
include: ["node-html-parser", "yaml"],
|
|
},
|
|
},
|
|
},
|
|
poolOptions: {
|
|
workers: {
|
|
wrangler: { configPath: "./wrangler.toml" },
|
|
},
|
|
},
|
|
},
|
|
}),
|
|
defineProject({
|
|
test: {
|
|
name: "Node",
|
|
include: ["**/*.node.test.ts"],
|
|
},
|
|
plugins: [tsconfigPaths()],
|
|
}),
|
|
]);
|
|
|
|
export default workspace;
|