Closed tomsquest closed 4 years ago
Shouldn't the test be all green, or all pink, or green then red, but not pink then green ?
If the code wasn't transformed (ie. it was JavaScript executed as is), then you are correct - I don't see any reasons how the test code can be pink and then green.
However, in your case it is TypeScript code transformed by ts-jest
, so theoretically, depending on how it is transformed and source-mapped (specifically async/await), it is possible to have some pink indicators and then green because of the way generated code is source mapped to the original code.
For example, it is theoretically possible to have a code transformation that is sourced mapped in such a way that some error causing transformed code regions executed after green code regions are sourced mapped back to original regions that reside earlier in the code than the green regions.
So the real executed code can be:
which will result in the following highlighting in the original source code:
If you are happy with the explanation, please feel free to close the issue. If you think it is not the case, and would like us to investigate the issue further, can you please create a sample repo (a shallow copy of your project with one simplified test will do, or you can email a more complex sample to hello@wallabyjs.com if you like) where the issue can be reproduced, we are happy to investigate and share the full report of what's going on with you.
Thanks for your detailed answer. :+1: I know understand what is going on. I will close it as I don't need more investigation at this point.
Thanks again @ArtemGovorov !
Issue description or question
We are doing a lot of integration tests. Sometimes, Wallabyjs fails to correctly highlight success/failure.
As you can see in the screenshot: in the same test, there is pink squares, then green.
Shouldn't the test be all green, or all pink, or green then red, but not pink then green ?
Wallaby diagnostics report