js-class-is icon indicating copy to clipboard operation
js-class-is copied to clipboard

[Symbol.toStringTag] getter seems to interfer with chai's deep.equal check

Open Gozala opened this issue 5 years ago • 0 comments

As per https://github.com/ipld/js-ipld-dag-pb/pull/184#discussion_r436880297 it appears that chai will deep equality check with duck typed counterpart of the instance because of the [Symbol.toStringTag] getter this library adds.

I have created pull request to illustrate this https://github.com/moxystudio/js-class-is/pull/26, although this library uses jest instead of chai same issue appears to manifest. Unwapped class does not seem to exhibit this behavior.

Gozala avatar Jun 24 '20 23:06 Gozala