effect
effect copied to clipboard
From Discord: Issue with `HashSet` Comparison in `@effect/vitest`
Summary
The user, khraks_mamtsov, is experiencing an issue with HashSet comparison in the @effect/vitest testing environment. They provided a test case using HashSet with custom Coords objects and encountered a failure when using expect(hsa).toEqual(hsb). They confirmed that they added the custom matchers necessary for @effect/vitest to work properly. Michaelarnaldi, likely a community member or developer familiar with the library, expressed surprise at the issue and hinted to resource documentation for setting up custom matchers. However, the issue persists even when running it in the @effect/vitest project environment.
Key takeaways:
- The user is trying to test equality between two
HashSetobjects containingCoords. - There might be an issue or limitation with how
@effect/vitesthandlesHashSetorCoordsequality. - The user has correctly set up custom matchers, as advised in documentation, but the problem still occurs.
- The issue could be specific to the setup or may require further investigation or a workaround.
Discord thread
https://discord.com/channels/795981131316985866/1362777149727183081