Effect-TS / effect

An ecosystem of tools to build robust applications in TypeScript
https://effect.website
MIT License
7.74k stars 246 forks source link

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

Open effect-bot opened 3 weeks ago

effect-bot commented 3 weeks ago

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:

Discord thread

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