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

Support for ES2015 Map/Set #1

Closed
mjackson opened this issue Dec 9, 2015 · 2 comments
Closed

Support for ES2015 Map/Set #1

mjackson opened this issue Dec 9, 2015 · 2 comments

Comments

@mjackson
Copy link

mjackson commented Dec 9, 2015

Hey @ljharb!

From a quick scan of the source code, it doesn't look like you currently support ES2015 Map and/or Set objects (please correct me if I'm wrong) and I was wondering if you have any plans there. I'm currently using deep-equal to do equality comparisons in expect, but it doesn't look like they're keen to support them because they are only interested in comparing public API. But I thought you might be interested in supporting them since you're going for "conceptual equality".

Also, does this library work well with circular references?

If you do, I think I could possibly make the switch and close these two issues :)

mjackson/expect#47
mjackson/expect#50

Thanks!

@ljharb
Copy link
Member

ljharb commented Dec 9, 2015

I definitely don't currently support it - you can Array.from/spread them to arrays, and compare them that way, and it should work great (assuming none of the keys/values are also collections), but I definitely should add support for generic iterables. It will require an additional dependency, but I don't think that's problematic.

As for circular references, I'm not really sure, but probably not - if you can file another issue referencing mjackson/expect#50 I can discuss/tackle that separately.

@ljharb
Copy link
Member

ljharb commented Dec 10, 2015

Published as v1.3.0.

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

2 participants