Skip to content

Commit

Permalink
Added a test covering the Hash.number bug for fractional numbers (#…
Browse files Browse the repository at this point in the history
…3373)

Co-authored-by: maksim.khramtsov <maksim.khramtsov@btsdigital.kz>
  • Loading branch information
KhraksMamtsov and maksim.khramtsov authored Jul 29, 2024
1 parent 5f01eb9 commit f566fd1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/twelve-peaches-double.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"effect": patch
---

Add test for Hash.number(0.1) !== Has.number(0)
1 change: 1 addition & 0 deletions packages/effect/test/Hash.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ describe("Hash", () => {
const set: HashSet.HashSet<number> = HashSet.make(Infinity)
expect(HashSet.has(set, Infinity)).toBe(true)
expect(HashSet.has(set, -Infinity)).toBe(false)
expect(Hash.number(0.1)).not.toBe(Hash.number(0))
})

it("bigint", () => {
Expand Down

0 comments on commit f566fd1

Please sign in to comment.