Closed ayushpahwa closed 4 days ago
The changes in this pull request primarily involve updates to the Jest configuration, dependency versions in package.json
, and modifications to the test setup in setup.ts
. The Jest configuration now includes enhanced options for TypeScript handling, while the package.json
reflects upgrades to several dependencies, particularly related to Jest. The test setup file has been adjusted to improve the mocking of global objects and APIs, ensuring a more robust testing environment.
File Path | Change Summary |
---|---|
app/client/jest.config.js | Updated transform property for ts-jest with new options; modified moduleNameMapper ; removed ts-jest from globals . |
app/client/package.json | Updated dependency versions for @types/jest , jest , jest-environment-jsdom , and ts-jest . |
app/client/test/setup.ts | Replaced global crypto with @peculiar/webcrypto ; updated API mocking; mocked IntersectionObserver and ResizeObserver ; defined WorkerStub . |
Objective | Addressed | Explanation |
---|---|---|
Upgrade version of jest from 27 to 29 | ✅ |
ts-jest
dependency version, connecting to Jest configuration changes.Enhancement
, Test
, JS Objects
, Javascript Product
🎉 In the land of code where Jest does play,
Dependencies danced and upgraded today.
With mocks and stubs, the tests now shine,
A seamless config, oh how divine!
TypeScript's embrace, a joyful embrace,
In the realm of testing, we've found our place! 🌟
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Description
Update version of the jest package to leverage new node features. Changes needed to make the new version compatible
ts-jest
had to be moved from globals to the transform block since it is a transformer and with new version, it is deprecated to keep them in globals.Array
before tests is no longer needed, it is implicit.global.crypto
is immutable and hence needs to be deleted before the new lib can be properly used. ReferenceFixes #37586
Automation
/test sanity
:mag: Cypress test results
Communication
Should the DevRel and Marketing teams inform users about this change?
Summary by CodeRabbit
Bug Fixes
New Features
Chores