Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Use custom
tsconfig
for ts-jest
By default, `ts-jest` will use `tsconfig.json` for TypeScript configuration. Our `tsconfig.json` sets `noUnusedLocals` to `true`. This means compilation will fail if we import something and don't use it. If you're running tests locally (using `script/start`, for example) and comment out a block of code that results in an import not being used, a compile error will result and the tests will not run until resolved. In reality you are going to use it, so you end up temporarily commenting out the import (once you've expanded them as the IDE collapses them 😅) This whole process is slow. In this change we instruct `ts-jest` to use a custom configuration, specifically allowing unused locals. This results in `jest` no longer complaining about unused imports and a faster feedback loop. Unused locals will continue to get caught in the compile and lint steps, which are run in CI. That is, this change simply improves the experience when running the tests. See: - https://www.typescriptlang.org/tsconfig#noUnusedLocals - https://huafu.github.io/ts-jest/user/config/tsConfig
- Loading branch information