timkindberg / jest-when

Jest support for mock argument-matched return values.
MIT License
734 stars 38 forks source link

feat(): make jest an peer dependancy #84

Closed chyzwar closed 2 years ago

chyzwar commented 3 years ago

This address #81. I tested with jest 24, 25, 26 and 27, it should work with other versions as well. This could be released as non-breaking change. My concern is that his still imports jesmineUtils from private module api see https://github.com/facebook/jest/blob/d6e5ddb0c3c1af54f443f225aa14cdf07c7bb593/packages/expect/package.json#L12

I think we should raise issue on jest repo to expose equals in public API of expect package.

timkindberg commented 3 years ago

Ok so even with the separate concern of importing equals from jasmineUtils you think this is safe to merge as a non-breaking minor release?

chyzwar commented 3 years ago

Yes, In my opinion it should safe but can run this patch tomorrow on large codebase at work. We use jest-when in few hundred tests.

chyzwar commented 3 years ago

I run on one of our codebases, it has 97 imports of jest-when, all tests passed and possibly slightly faster.

ericcornelissen commented 2 years ago

It's a minor data point but I run the tests for ericcornelissen/svgo-action successfully when using these changes.