Jest unable to cover the code optional chaining with ternary operator #12213
Unanswered
pankajd1990
asked this question in
Help/Questions
Replies: 2 comments
-
If your Vue 3 project uses Vite, you can directly replace Jest with Vitest. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Just update the tsconfig, from target: "ES6" to "ES2020" or latest |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have written the following code in my vue3 project. when i checking jest code coverage then optional chaining with ternary operator showing branch is not covered . I have written all unit test case .
below is my code
my Unit test case
jest config file
tsconfig file
code coverage report
In above image .checked saying branch is not cover
Beta Was this translation helpful? Give feedback.
All reactions