Skip to content

Object with index as keys should not equal array #17

Closed
inspect-js/node-deep-equal
#65

Description

@a-b-r-o-w-n
expect({ 0: 'hello', 1: 'world' }).toEqual([ 'hello', 'world' ]);

I don't think this should pass, but it does. Is there something I am missing, or is this not intended?

Activity

  1. mjackson commented on Sep 11, 2015

    @mjackson
    Owner

    JavaScript arrays are actually objects (with special semantics). I see no reason why that test shouldn't pass.

  2. aaronjensen commented on Sep 11, 2015

    @aaronjensen
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions