Skip to content

DeepTutor: Lifelong Personalized Tutoring. https://deeptutor.info/.

fix(web): give the node-test program the ambient DOM declarations

Bingxi Zhao (Frank)ad01418bd382
diff --git a/web/tsconfig.node-tests.json b/web/tsconfig.node-tests.json
index fb5b38045..24b507cf6 100644
--- a/web/tsconfig.node-tests.json
+++ b/web/tsconfig.node-tests.json
@@ -12,5 +12,10 @@
"@/*": ["./*"]
}
},
- "include": ["tests/**/*.ts"]
+ // The ambient File System Access declarations live in types/ and are
+ // listed in the app tsconfig's include. This program needs them too:
+ // a test that imports lib/chat-import/* pulls in code calling
+ // FileSystemDirectoryHandle.values(), which the DOM lib alone does not
+ // declare at this TS version.
+ "include": ["tests/**/*.ts", "types/**/*.d.ts"]
}