Skip to content

Commit

Permalink
fix(types): work around conflicting cypress and jest types
Browse files Browse the repository at this point in the history
cypress ships mocha, which declares e.g. `describe` on a top level, as does
jest. unfortunately their types are incompatible, forcing us to either resort to
whitelisting types (which is tedious) or blindly trusting .d.ts-files.

to learn more, you might want to look here:
cypress-io/cypress#1087
  • Loading branch information
pierrebeitz committed Feb 22, 2019
1 parent 094e5e9 commit e7619f8
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@
"experimentalDecorators": true,
"emitDecoratorMetadata": true,
"baseUrl": "./",

// we trust .d.ts-files blindly, mostly because the mocha shipped by cypress
// conflicts with jest otherwise. an alternative approach would be to whitelist
// @types per `"types": ["jest", "graphql", ...],`, but as this introduces a
// high chance of forgetting to add new libs here, we stick with skipLibCheck.
"skipLibCheck": true,

"paths": {
"@dcos/http-service": ["src/typings/dcos__http-service"],
"*": ["*", "packages/*", "src/typings/*"],
Expand Down

0 comments on commit e7619f8

Please sign in to comment.