timkindberg / jest-when

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

Issues with Jest 28 version #96

Closed azakordonets closed 2 years ago

azakordonets commented 2 years ago

It looks like this library will not work with Jest 28.

Cannot find module 'expect/build/jasmineUtils' from 'node_modules/jest-when/src/when.js'

    Require stack:
      node_modules/jest-when/src/when.js
      src/functions/public/exposed-objects/contact-collection/get-enriched-contacts.spec.ts

      at Resolver._throwModNotFoundError (node_modules/jest-resolve/build/resolver.js:491:11)
      at Object.<anonymous> (node_modules/jest-when/src/when.js:2:15)

Any plans to support that in the future or it's not gonna happen ?

timkindberg commented 2 years ago

Have you tried updating jest-when to the latest version? I no longer require that package since v3.4.1.

azakordonets commented 2 years ago

Will give it a try, thanks

azakordonets commented 2 years ago

Yeah, I was using 3.3.1. Thanks !