jest-cli v29.1.0 Release Notes

  • ๐Ÿ”‹ Features

    • ๐Ÿ‘ [expect, @jest/expect] support type inference for function parameters in CalledWith assertions (#13268)
    • [expect, @jest/expect] Infer type of *ReturnedWith matchers argument (#13278)
    • [@jest/environment, jest-runtime] Allow jest.requireActual and jest.requireMock to take a type argument (#13253)
    • ๐Ÿคก [@jest/environment] Allow jest.mock and jest.doMock to take a type argument (#13254)
    • [@jest/fake-timers] Add jest.now() to return the current fake clock time (#13244, #13246)
    • ๐Ÿคก [@jest/mock] Add withImplementation method for temporarily overriding a mock (#13281)
    • [expect] Export toThrow* matchers (#13328)

    ๐Ÿ›  Fixes

    • [jest-circus, jest-jasmine2] Fix error messages for Node's assert.throes (#13322)
    • [jest-haste-map] Remove __proto__ usage (#13256)
    • ๐Ÿคก [jest-mock] Improve spyOn typings to handle optional properties (#13247)
    • ๐Ÿคก [jest-mock] Fix mocking of getters and setters on classes (#13145)
    • [jest-snapshot] Throw useful error when an array is passed as property matchers (#13263)
    • ๐Ÿ“œ [jest-snapshot] Prioritize parser used in the project (#13323)
    • ๐Ÿ [jest-transform] Attempt to work around issues with atomic writes on Windows (#11423)