fix typing conflict between jest and cypress

Cypress and Jest both define "expect", but they come from different
libraries (Cypress uses Chai, Jest uses its own thing). So we can't
include both of them in the tsconfig.json. Conveniently, however, we
don't need any of the test code to be part of the main project, so
it suffices to give these things their own tsconfig.json files.

That being done, adding "jest" to the global types lets us remove all
those imports.
This commit is contained in:
JP Sugarbroad
2022-05-10 20:04:19 -07:00
parent ce888b757a
commit 01529a8347
13 changed files with 24 additions and 25 deletions

9
test/tsconfig.json Normal file
View File

@@ -0,0 +1,9 @@
{
"extends": "../tsconfig.json",
"compilerOptions": {
"allowJs": true,
"types": ["jest"]
},
"include": ["**/*", "../src/**/*.d.ts"],
"exclude": ["cypress/**/*"]
}