When I have diagnostics: false jest still prints out type errors
See original GitHub issue🐛 Bug Report
seems to me like diagnostics: false
should ensure that we only transpile without doing any type checking
To Reproduce
Steps to reproduce the behavior: run any code with a type error with
globals: {
'ts-jest': {
diagnostics: false
}
}
in your jest.config.js
this is for my test:
Expected behavior
no type errors are checked
Link to repo (highly encouraged)
Debug log:
# content of ts-jest.log :
envinfo
System:
OS: ubuntu 21.04
Node version: 16
Npm packages:
jest: 27
ts-jest: 27
typescript: 4.4.2
babel(optional):
Issue Analytics
- State:
- Created 2 years ago
- Comments:5
Top Results From Across the Web
Disable type checking? · Issue #822 · kulshekhar/ts-jest - GitHub
Diagnostics false just prevents typescript errors to stop compilation but it still print errors. IsolatedModules hide some errors not all. The ...
Read more >Diagnostics option | ts-jest - Huafu
The diagnostics option allows to configure error reporting. It can both be enabled/disabled entirely or limited to a specific type of errors and/or...
Read more >Configuring Jest
Jest will run .mjs and .js files with nearest package.json 's type field set to module as ECMAScript Modules.
Read more >Getting error in unit test from new vue 3 project generated by CLI
cypress. When I run npm run test:unit I get the below error TypeScript diagnostics (customize using `[jest- ...
Read more >Diagnosing Diagnosis Errors: Lessons from a Multi ... - NCBI
A recurring issue is the sorting-out of relationships among errors in the diagnostic process, delay and misdiagnosis, and adverse patient outcomes.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I have the same issue on Mac (Big Sur: 11.5.2), I cleared cache and still received these errors.
Neither
isolatedModules: true
ordiagnostics: false
in my tsconfig work for disabling type checking on*.jsx
files.My tsconfig (
test.tsconfig.json
)**Edit: ** it was my fault, ignore me.
My problem was that there were legitimate JavaScript type errors occurring and I assumed it was typescript type checking errors. Sorry about the confusion.
interesting. It only happened once, after that it seems to work correctly. Might be a cache issue.