Conversation
| describe("applyChecksumMiddleware", () => { | ||
| const mockEncoder = jest.fn(() => "encoded"); | ||
| const mockHashUpdate = jest.fn(() => {}); | ||
| const mockHashDigest = jest.fn(() => new Uint8Array(0)); |
There was a problem hiding this comment.
Just out of curiosity, is this code allowed in jest 24?
There was a problem hiding this comment.
jest.fn().mockReturnValue(value) is just a simple sugar function for jest.fn(() => value)
It's backward compatible, but was removed as it was failing pretest
packages/credential-provider-cognito-identity/src/fromCognitoIdentityPool.spec.ts
Show resolved
Hide resolved
|
@trivikr Now the default testMatch of jest 24 includes ts file directly(https://jestjs.io/docs/en/configuration#testmatch-array-string). This means we cannot run test command under each sub package, because jest will fail testing the |
|
@AllanFly120 I'll rename root file to jest.config.base.js and extend it in jest.config.js in |
|
I'd experimented with adding jest.config.js in packages/* while experimenting with removing lerna run pretest will be removed when we move to ts-jest |
3206bab to
cbe89e2
Compare
|
For the record of the off-line discussion on
|
|
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread. |
Issue #, if available:
N/A
Description of changes:
This PR updates jest from v20 to v24
Pending (to be done separately as this update is not delayed):
Uncomment and fix test with localStorage(fixed in cbe89e2 thanks to @AllanFly120)All experimental commits can be viewed in fork https://github.com/trivikr/aws-sdk-js-v3/tree/jest-update
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.