digestweb.dev
Propose a News Source
Support usSponsor
🤝
Curated byFRSOURCE

digestweb.dev

Your essential dose of webdev and AI news, handpicked.

Advertisement

Want to reach web developers daily?

Advertise with us ↗

Back to Daily Feed

Jest v30.5.0: `whenCalledWith`, Describe Retries & New File Watcher

Must Read

Originally published on Jest Releases

View Original Article
Share this article:
Jest v30.5.0: `whenCalledWith`, Describe Retries & New File Watcher

Summary & Key Takeaways ​

  • Mock functions now support whenCalledWith to configure return values based on specific arguments.
  • jest.retryTimes() can now be applied to entire describe blocks, rerunning all hooks and tests.
  • The file watcher for non-Watchman environments has been rewritten using @parcel/watcher.
  • fdir replaces hand-rolled directory recursion in the crawler.
  • The release touches jest-runtime, jest-resolve, and jest-haste-map extensively.
  • Argument slots for whenCalledWith accept literals or asymmetric matchers.

Our Commentary ​

This is a genuinely big release for Jest, despite being a minor version. whenCalledWith is a game-changer for mocking complex scenarios, and describe-level retries will save so much headache for flaky integration tests. I'm also curious about the new file watcher; performance improvements there are always welcome. It's a solid set of features that will make testing more robust and flexible.

View Original Article
Share this article:
RSS Atom JSON Feed
© 2026 digestweb.dev — brought to you by  FRSOURCE