node -v: v14.13.1npm -v: 6.14.8npm ls jest or npm ls react-scripts (if you haven鈥檛 ejected): (not sure $ yarn list jest
[email protected]
$ yarn list react-scripts
[email protected]
your vscode-jest settings if customized:
"jest.pathToJest": "./node_modules/.bin/react-scripts test"Operating system: Manjaro Gnome Linux
I've made a codesandbox so you can get the exact files - it shall not be used for reproducing the issue as the vscode-jest obviously is not part of codesandbox' ecosystem (and it has an issue with jest.useRealTimers anyways).
You should rather use it to just copy-paste:
Headers.test.tsxHeaders.tsxtypes.tsjest.config.tstsconfig-jest.jsonhttps://codesandbox.io/s/jest-fail-wbktj?file=/src/Headers.test.tsx
Tests are all successful when running jest and Output: jest also seems to be working correctly and with all the relevant details
Show an error or a successful status in gutter
Shows ? in gutter if I add more than 1 tests in describe('TableCollection::Headers::HeaderInput'
Shows ? in gutter in every single test after the commented test in a predictable way, but the behavior seems random:
? appears.https://user-images.githubusercontent.com/9019120/115970717-e56aa080-a54c-11eb-97f1-93660548b15f.mp4
It really looks like a quite random behavior, I dont know what could remotely be the issue.
@exapsy looks like you are using v4 alpha and you have parameterized tests, in this case, you will need jest >= 26.5.0. You seem to be using [email protected].
I copied your sandbox and run it with v4.0.0-alpha.5 and jest 26.6.x and it seems to be working fine... Free free to give it a try and let us know if it works.
Yeah that seems to be it. I wonder what was making this happen, seems like an interesting issue.
I wonder what was making this happen, seems like an interesting issue
Yeah, unlike the earlier versions that use test names to find test results for each test block, v4 relies on relative position instead. Prior to 26.5.0, jest had a bug ( facebook/jest#10412 ) that output all parameterized test results with the incorrect (hardcoded) position. The combination of the two is what caused the behavior you were seeing.
Most helpful comment
@exapsy looks like you are using v4 alpha and you have parameterized tests, in this case, you will need jest >= 26.5.0. You seem to be using [email protected].
I copied your sandbox and run it with v4.0.0-alpha.5 and jest 26.6.x and it seems to be working fine... Free free to give it a try and let us know if it works.