Skip to content
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

chore(deps-dev): bump jest to 29.3.1 #4242

Closed
wants to merge 3 commits into from

Conversation

siddsriv
Copy link
Contributor

@siddsriv siddsriv commented Nov 30, 2022

Issue

Internal JS-3363

Description

Bumps jest to 29.3.1 along with jest-environment-jsdom (to 29.3.1) and jsdom (to 20.0.3)

Testing

build:all is succesful -- verifies all build commands

$ yarn build:all 
lerna success - @aws-sdk/aws-echo-service
lerna success - @aws-sdk/aws-protocoltests-ec2
lerna success - @aws-sdk/aws-protocoltests-json-10
lerna success - @aws-sdk/aws-protocoltests-json
lerna success - @aws-sdk/aws-protocoltests-query
lerna success - @aws-sdk/aws-protocoltests-restjson
lerna success - @aws-sdk/aws-protocoltests-restxml
lerna success - @aws-sdk/aws-restjson-server
lerna success - @aws-sdk/aws-restjson-validation-server
Done in 289.74s.

test:all also gave the expected results.

Additional Context

PR to bump Jest to major version 28.
Announcement and snapshot format changes for Jest 29: https://jestjs.io/blog/2022/08/25/jest-29


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@siddsriv siddsriv requested a review from a team as a code owner November 30, 2022 20:13
@siddsriv siddsriv marked this pull request as draft November 30, 2022 20:13
@siddsriv siddsriv marked this pull request as ready for review November 30, 2022 20:20
@trivikr trivikr marked this pull request as draft November 30, 2022 20:26
@siddsriv siddsriv marked this pull request as ready for review December 1, 2022 18:14
Copy link
Member

@trivikr trivikr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The command yarn test:all fails for me:

                "Bucket": "example-bucket",
                "Key": "example-key",
            -   "PartNumber": 1,
            +   "PartNumber": 2,
                "UploadId": "mockuploadId",
              },
           2: {"Body": {"data": [35, 35, 35, 35, 35, 35, 35, 35, 35, 35, …], "type": "Buffer"}, "Bucket": "example-bucket", "Key": "example-key", "PartNumber": 1, "UploadId": "mockuploadId"}
           
      Number of calls: 2

      318 |     // upload parts is called correctly.
      319 |     expect(uploadPartMock).toHaveBeenCalledTimes(2);
    > 320 |     expect(uploadPartMock).toHaveBeenNthCalledWith(1, {
          |                            ^
      321 |       ...actionParams,
      322 |       // @ts-ignore extended custom matcher
      323 |       Body: expect.toHaveSameHashAsBuffer(firstBuffer),

      at src/Upload.spec.ts:320:28
      at fulfilled (src/Upload.spec.ts:5:58)
 ...
    expect(received).toEqual(expected) // deep equality

    - Expected  - 2
    + Received  + 2
 
      555 |     });
      556 |     await upload.done();
    > 557 |     expect(received[0]).toEqual({
          |                         ^
      558 |       Key: params.Key,
      559 |       Bucket: params.Bucket,
      560 |       loaded: firstBuffer.byteLength,

      at src/Upload.spec.ts:557:25
      at fulfilled (src/Upload.spec.ts:5:58)
  
 ...
 
Test Suites: 2 failed, 3 skipped, 335 passed, 337 of 340 total
Tests:       2 failed, 58 skipped, 5169 passed, 5229 total
Snapshots:   0 total
Time:        78.104 s

@trivikr
Copy link
Member

trivikr commented Dec 2, 2022

You can replicate it by running the failing tests in lib-storage/src/Upload.spec.ts:

$ lib-storage> yarn test src/Upload.spec.ts
...
Test Suites: 1 failed, 1 total
Tests:       2 failed, 20 passed, 22 total
Snapshots:   0 total
Time:        5.134 s, estimated 6 s
Ran all test suites matching /src\/Upload.spec.ts/i.
error Command failed with exit code 1.

@trivikr trivikr changed the title chore(deps-dev): Bump jest to 29.3.1 chore(deps-dev): bump jest to 29.3.1 Dec 2, 2022
@siddsriv siddsriv closed this Aug 23, 2023
@siddsriv siddsriv deleted the bump-jest-29.3.1 branch August 23, 2023 19:50
@github-actions
Copy link

github-actions bot commented Sep 7, 2023

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants