Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[IMP] test: make test tsconfig work in vscode
The root tsconfig.json file don't include the tests files, to not waste time compiling the tests when it's not needed. Another tsconfig file `tsconfig.test.json` was added in 09863df, to give as argument to jest to compile the tests. This file is however not used by VSCode to find errors in the tests files, and some default ts configuration was used instead. This led to mismatch between the errors appearing in the IDE, and errors when running the tests. The two most common errors in VSCode were: - custom jest matcher (eg. `toBeCancelledBecause`) not found - strict type checking in `test.each` arguments leading to errors This commit fix the issue by adding a `test/tsconfig.json` file, which extends the root `tsconfig.json` file, and is used by both jest and VSCode. Note that the tests run fine without giving this file to jest, because the root `tsconfig.json` file is used, and the jest matcher are defined with `setupFilesAfterEnv` in `package.json`. Odoo task 3255953 closes #2315 X-original-commit: a4a8230 Signed-off-by: Rémi Rahir (rar) <[email protected]> Signed-off-by: Minne Adrien (adrm) <[email protected]>
- Loading branch information