Skip to content

Commit 8178f0a

Browse files
Copilothotlong
andcommitted
Add comprehensive vitest tests for Next.js adapter
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
1 parent b7553aa commit 8178f0a

5 files changed

Lines changed: 418 additions & 2 deletions

File tree

packages/adapters/nextjs/package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
"main": "dist/index.js",
66
"types": "dist/index.d.ts",
77
"scripts": {
8-
"build": "tsup --config ../../../tsup.config.ts"
8+
"build": "tsup --config ../../../tsup.config.ts",
9+
"test": "vitest run",
10+
"test:watch": "vitest"
911
},
1012
"peerDependencies": {
1113
"@objectstack/runtime": "workspace:*",
@@ -18,6 +20,7 @@
1820
"next": "^15.0.8",
1921
"react": "^19.2.4",
2022
"react-dom": "^19.2.4",
21-
"typescript": "^5.0.0"
23+
"typescript": "^5.0.0",
24+
"vitest": "^4.0.18"
2225
}
2326
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// Stub for @objectstack/runtime - replaced by vi.mock in tests
2+
export const HttpDispatcher = class {};
3+
export type ObjectKernel = any;
4+
export type HttpDispatcherResult = any;

0 commit comments

Comments
 (0)