test(worker): add vitest harness

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-23 11:18:57 +02:00
co-authored by Claude Opus 4.8
parent 80aa2b0ee0
commit 8b443620c8
4 changed files with 1054 additions and 3 deletions
+1034 -1
View File
File diff suppressed because it is too large Load Diff
+5 -2
View File
@@ -6,7 +6,9 @@
"scripts": { "scripts": {
"build": "tsc", "build": "tsc",
"start": "node dist/index.js", "start": "node dist/index.js",
"dev": "tsx watch src/index.ts" "dev": "tsx watch src/index.ts",
"test": "vitest run",
"test:watch": "vitest"
}, },
"dependencies": { "dependencies": {
"@prisma/adapter-pg": "^7.4.0", "@prisma/adapter-pg": "^7.4.0",
@@ -23,6 +25,7 @@
"@types/yauzl": "^2.10.3", "@types/yauzl": "^2.10.3",
"prisma": "^7.4.0", "prisma": "^7.4.0",
"tsx": "^4.21.0", "tsx": "^4.21.0",
"typescript": "^5" "typescript": "^5",
"vitest": "^3.2.4"
} }
} }
+7
View File
@@ -0,0 +1,7 @@
import { describe, it, expect } from "vitest";
describe("harness", () => {
it("runs", () => {
expect(1 + 1).toBe(2);
});
});
+8
View File
@@ -0,0 +1,8 @@
import { defineConfig } from "vitest/config";
export default defineConfig({
test: {
environment: "node",
include: ["src/**/*.test.ts"],
},
});