-
Notifications
You must be signed in to change notification settings - Fork 578
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: update jest v20 to v24 #243
Conversation
@@ -2,14 +2,14 @@ import { applyBodyChecksumMiddleware } from "./"; | |||
import { HashConstructor, HttpRequest } from "@aws-sdk/types"; | |||
|
|||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just out of curiosity, is this code allowed in jest 24?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.