effect icon indicating copy to clipboard operation
effect copied to clipboard

From Discord: Issue with `HashSet` Comparison in `@effect/vitest`

Open effect-bot opened this issue 8 months ago • 0 comments

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 HashSet objects containing Coords.
  • There might be an issue or limitation with how @effect/vitest handles HashSet or Coords equality.
  • 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

effect-bot avatar Apr 19 '25 05:04 effect-bot