Skip to content

Comparison between uninitialized arrays fail #62

@omarjackman

Description

@omarjackman

Performing a deep equal on an uninitialized array doesn't behave as expected.

      const myTestArray1 = [undefined, 'test']
      const myTestArray2 = []
      // myTestArray2[0] should be equal to undefined by default
      myTestArray2[1] = 'test'

      expect(myTestArray1).to.deep.equal(myTestArray2)

I would expect these two arrays to pass a deep equality check since javascript seems to default uninitialized values to undefined

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions