l2beat/earl

toBeAnArrayWith doesn't handle repeated items as expected

sz-piotr opened this issue · 1 comments

Can easily be checked with the following two tests

describe('repeated items', () => {
  it('works', () => {
    earl([1, 1]).toBeAnArrayWith(1, 1)
  })

  // this test fails
  it('throws', () => {
    expect(() => earl([1]).toBeAnArrayWith(1, 1)).to.throw('[1] does not contain array [1, 1]')
  })
})