Closed kristerkari closed 1 year ago
Patch coverage: 75.00
% and project coverage change: +0.05
:tada:
Comparison is base (
87daaa6
) 92.39% compared to head (70eb736
) 92.45%.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.
Hello,
When transforming a large test suite I noticed that the
.to.contain
transformations are not done very well when there are function calls involved.In the case when the argument for
expect()
or.to.contain()
is a function call, it would be better to simply transform.to.contain()
=>.toContain()
to avoid any problematic results, which is what my changes do.Since in Jest's
.toContain
works on strings and arrays, it should not be needed to transform.to.contain
to anything more complicated when we don't know what the result of the function call is.A real example from the codebase that I'm transforming:
...gets transformed to:
...and after these changes:
ping @skovhus