Closed ocean90 closed 3 years ago
Ah damn... you are right. This was a dumb oversight. Of course ppl would be passing functions, for some reason I didn't see that it would conflict with just a regular function matcher. Gonna have to figure out what I want to do here.
Thank you!
Ok I think I came up with a decent solution. So now your regular function args should work again (sorry!). And now for the new feature I added you have to wrap the functions with when
to make them behave the way I originally intended, where they become a predicate matcher.
Please update to v3.2.1 for the bug fix.
I updated the release notes and the README. https://github.com/timkindberg/jest-when/releases
Thank you @timkindberg!
Hey @timkindberg, I noticed that v3.2.0 seems to break existing tests and I'm not sure if that's expected. Based on semver I'd expect not.
You can see an example in these check results for https://github.com/tjenkinson/gh-action-auto-merge-dependency-updates/pull/113. It may take a while until the results are loaded so I'm also pasting an example here:
The related test code is https://github.com/tjenkinson/gh-action-auto-merge-dependency-updates/blob/56c26aed95cf78be3712376cb2d61b4eb041cfd3/src/run.test.ts#L347-L355.
When reverting https://github.com/timkindberg/jest-when/commit/6190463734b92d43dcc974570292ac831c1d1a6c the tests are passing again. Do you have an idea what the issue might be? Thanks!