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

feat(expect): Add equality support for Array Buffers to ToStrictEqual method #11805

Merged
merged 13 commits into from Sep 29, 2021

Conversation

@khai93
Copy link
Contributor

@khai93 khai93 commented Sep 2, 2021

Summary

Adds equality checks for Array Buffers in ToStrictEqual method, Fixes #11770.

Test plan

The changes add a new entry to the array toStrictEqualTesters in expect package's matchers.ts and a new util function arrayBufferEquality. I've added tests in matchers.test.js to test the actual method and tests in utils.test.ts to test the util function.

@codecov-commenter
Copy link

@codecov-commenter codecov-commenter commented Sep 2, 2021

Codecov Report

Merging #11805 (41cc53d) into master (98f10e6) will increase coverage by 0.02%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #11805      +/-   ##
==========================================
+ Coverage   69.04%   69.06%   +0.02%     
==========================================
  Files         312      312              
  Lines       16366    16377      +11     
  Branches     4746     4749       +3     
==========================================
+ Hits        11300    11311      +11     
  Misses       5039     5039              
  Partials       27       27              
Impacted Files Coverage Δ
packages/expect/src/matchers.ts 97.86% <ø> (ø)
packages/expect/src/utils.ts 95.83% <100.00%> (+0.25%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 98f10e6...41cc53d. Read the comment docs.

Loading

Copy link
Collaborator

@SimenB SimenB left a comment

Thanks! Implementation looks good, just some formatting and type suggestions 🙂

Loading

CHANGELOG.md Outdated Show resolved Hide resolved
Loading
packages/expect/src/utils.ts Outdated Show resolved Hide resolved
Loading
packages/expect/src/utils.ts Outdated Show resolved Hide resolved
Loading
packages/expect/src/utils.ts Outdated Show resolved Hide resolved
Loading
packages/expect/src/utils.ts Outdated Show resolved Hide resolved
Loading
khai93 and others added 5 commits Sep 2, 2021
Co-authored-by: Simen Bekkhus <sbekkhus91@gmail.com>
Co-authored-by: Simen Bekkhus <sbekkhus91@gmail.com>
Co-authored-by: Simen Bekkhus <sbekkhus91@gmail.com>
Co-authored-by: Simen Bekkhus <sbekkhus91@gmail.com>
@khai93 khai93 requested a review from SimenB Sep 2, 2021
@SimenB
Copy link
Collaborator

@SimenB SimenB commented Sep 8, 2021

Can you fix the eslint errors?

Loading

@khai93
Copy link
Contributor Author

@khai93 khai93 commented Sep 8, 2021

Can you fix the eslint errors?

Done.

Loading

SimenB
SimenB approved these changes Sep 29, 2021
@SimenB SimenB merged commit 94734e1 into facebook:main Sep 29, 2021
29 of 30 checks passed
Loading
G-Rath added a commit to G-Rath/jest that referenced this issue Oct 2, 2021
@github-actions
Copy link

@github-actions github-actions bot commented Oct 30, 2021

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

Loading

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 30, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

4 participants