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

fix(assert): fix assertObjectMatch() prints arrays as objects #5503

Merged
merged 3 commits into from
Jul 23, 2024

Conversation

babiabeo
Copy link
Contributor

@babiabeo babiabeo commented Jul 22, 2024

Separated from #5408
Fix: #3472

Currently, when filtering arrays, assertObjectMatch() uses filterObject({ ...value }, { ...subset }) which converts arrays into objects. This PR adds filterArray() function to handle arrays.

@babiabeo babiabeo requested a review from kt3k as a code owner July 22, 2024 10:39
Copy link

codecov bot commented Jul 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.30%. Comparing base (b6b0d68) to head (aef2ecb).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5503   +/-   ##
=======================================
  Coverage   96.29%   96.30%           
=======================================
  Files         465      465           
  Lines       37711    37760   +49     
  Branches     5560     5574   +14     
=======================================
+ Hits        36315    36364   +49     
  Misses       1354     1354           
  Partials       42       42           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@iuioiua iuioiua changed the title fix(assert): fix assertObjectMatch prints arrays as objects fix(assert): fix assertObjectMatch() prints arrays as objects Jul 23, 2024
Copy link
Contributor

@iuioiua iuioiua left a comment

Choose a reason for hiding this comment

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

Nice! Thank you.

@iuioiua iuioiua merged commit 5cff014 into denoland:main Jul 23, 2024
17 checks passed
@kt3k
Copy link
Member

kt3k commented Jul 23, 2024

Nice work!

@babiabeo babiabeo deleted the fix-assertObjectMatch-2 branch July 23, 2024 03:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

assertObjectMatch error message diff prints arrays as objects
3 participants