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: maps utils invariants for collections containing undefined values #103

Merged
merged 1 commit into from
Dec 23, 2020

Conversation

wschurman
Copy link
Member

Why

A map can have undefined values on purpose, which makes it hard to distinguish from an undefined result of Map.get (could do a Map.has and invariant on that, but it's unnecessary in these cases since these invariants were just for programmer confidence, not API correctness or soundness).

How

Remove invariants.

Test Plan

Run tests (which test these extensively).

@codecov
Copy link

codecov bot commented Dec 23, 2020

Codecov Report

Merging #103 (ba822c5) into master (15546aa) will decrease coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #103      +/-   ##
==========================================
- Coverage   94.95%   94.95%   -0.01%     
==========================================
  Files          66       66              
  Lines        1626     1624       -2     
  Branches      196      195       -1     
==========================================
- Hits         1544     1542       -2     
  Misses         80       80              
  Partials        2        2              
Flag Coverage Δ
integration 94.95% <100.00%> (-0.01%) ⬇️
unittest 94.95% <100.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
packages/entity/src/utils/collections/maps.ts 100.00% <100.00%> (ø)

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 15546aa...ba822c5. Read the comment docs.

@wschurman wschurman merged commit 29c1a43 into master Dec 23, 2020
@wschurman wschurman deleted the @wschurman/fix-maps-utils branch December 23, 2020 22:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant