Browse Source

chore: fix test

Adam 2 weeks ago
parent
commit
19ad7ad809

+ 1 - 0
packages/app/bunfig.toml

@@ -1,2 +1,3 @@
 [test]
+root = "./src"
 preload = ["./happydom.ts"]

+ 1 - 0
packages/app/src/components/file-tree.test.ts

@@ -6,6 +6,7 @@ let dirsToExpand: typeof import("./file-tree").dirsToExpand
 
 beforeAll(async () => {
   mock.module("@solidjs/router", () => ({
+    useNavigate: () => () => undefined,
     useParams: () => ({}),
   }))
   mock.module("@/context/file", () => ({

+ 1 - 0
packages/app/src/context/comments.test.ts

@@ -6,6 +6,7 @@ let createCommentSessionForTest: typeof import("./comments").createCommentSessio
 
 beforeAll(async () => {
   mock.module("@solidjs/router", () => ({
+    useNavigate: () => () => undefined,
     useParams: () => ({}),
   }))
   mock.module("@opencode-ai/ui/context", () => ({

+ 1 - 0
packages/app/src/context/terminal.test.ts

@@ -5,6 +5,7 @@ let getLegacyTerminalStorageKeys: (dir: string, legacySessionID?: string) => str
 
 beforeAll(async () => {
   mock.module("@solidjs/router", () => ({
+    useNavigate: () => () => undefined,
     useParams: () => ({}),
   }))
   mock.module("@opencode-ai/ui/context", () => ({