vitest, @cloudflare/vitest-plugin, and typescript are devDependencies here instead of being borrowed from diigo-bookmarks through hand-made node_modules symlinks and a deep-path import. - lint: wrangler types, then tsc over src/ and tests/ (Cloudflare's documented typecheck shape: regenerate types, then tsc) - test: vitest run - tests/tsconfig.json per the vitest-plugin docs; the dangling typecheck script (tsconfig.check.json never existed) is gone Generated-by: Claude Opus 5.5
25 lines
548 B
TypeScript
25 lines
548 B
TypeScript
import { defineProject } from "vitest/config";
|
|
import { cloudflareTest } from "@cloudflare/vitest-plugin";
|
|
|
|
export default defineProject({
|
|
plugins: [
|
|
cloudflareTest({
|
|
// the real worker + DOs; WEBAPP is a fake (aux workers must be JS)
|
|
wrangler: { configPath: "./wrangler.tests.jsonc" },
|
|
miniflare: {
|
|
workers: [
|
|
{
|
|
name: "fake-webapp",
|
|
modules: true,
|
|
scriptPath: "./tests/fake-webapp.js",
|
|
compatibilityDate: "2026-09-29",
|
|
},
|
|
],
|
|
},
|
|
}),
|
|
],
|
|
test: {
|
|
include: ["tests/**/*.test.ts"],
|
|
},
|
|
});
|