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

From Discord: Issue with deepStrictEqual not working for Option.Option comparison #3913

Open
effect-bot opened this issue Nov 7, 2024 · 0 comments

Comments

@effect-bot
Copy link

Summary

In the chat, a user named fubhy reports an issue where the deepStrictEqual function does not work as expected for comparing Option.Option types in TypeScript. Specifically, the comparison fails to distinguish between Option.some("foo") and Option.none(), and incorrectly passes as equal. Fubhy notes that this issue occurs only when comparing with none. Michaelarnaldi suggests checking if matchers have been set up but then realizes this discussion pertains to the effect test suite. Michaelarnaldi mentions that a redesign is planned and suggests potentially addressing this as part of a hackathon.

Key takeaways:

  • deepStrictEqual has a known issue when comparing Option.Option types, specifically with none.
  • The issue does not occur with non-none option comparisons.
  • A redesign is planned, which may address this issue.
  • The problem could be an opportunity for community contribution, potentially in a hackathon context.

Discord thread

https://discord.com/channels/795981131316985866/1304044332856119296

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

No branches or pull requests

1 participant