Skip to content

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

Merged
iuioiua merged 3 commits into
denoland:mainfrom
babiabeo:fix-assertObjectMatch-2
Jul 23, 2024
Merged

iuioiua merged 3 commits into
denoland:mainfrom
babiabeo:fix-assertObjectMatch-2

Conversation

@babiabeo

@babiabeo babiabeo commented Jul 22, 2024 •

Copy link
Copy Markdown
Contributor

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
@codecov

codecov Bot commented Jul 22, 2024 •

Copy link
Copy Markdown

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

@iuioiua iuioiua left a comment

Copy link
Copy Markdown
Contributor

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
@kt3k

kt3k commented Jul 23, 2024

Copy link
Copy Markdown
Contributor

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