spec icon indicating copy to clipboard operation
spec copied to clipboard

feat: new matchers

Open dtengeri opened this issue 2 years ago • 1 comments

Implementing matchers of the list in #1

  • [ ] expect.extend(matchers)
  • [ ] expect.anything()
  • [ ] expect.any(constructor)
  • [ ] expect.arrayContaining(array)
  • [ ] expect.assertions(number)
  • [ ] expect.hasAssertions()
  • [ ] expect.not.arrayContaining(array)
  • [ ] expect.not.objectContaining(object)
  • [ ] expect.not.stringContaining(string)
  • [ ] expect.not.stringMatching(string | regexp)
  • [ ] expect.objectContaining(object)
  • [ ] expect.stringContaining(string)
  • [ ] expect.stringMatching(string | regexp)
  • [ ] expect.addSnapshotSerializer(serializer)
  • [ ] .toHaveLength(number)
  • [ ] .toHaveProperty(keyPath, value?)
  • [ ] .toBeCloseTo(number, numDigits?)
  • [ ] .toBeDefined()
  • [x] .toBeFalsy()
  • [x] .toBeGreaterThan(number | bigint)
  • [x] .toBeGreaterThanOrEqual(number | bigint)
  • [x] .toBeLessThan(number | bigint)
  • [x] .toBeLessThanOrEqual(number | bigint)
  • [x] .toBeInstanceOf(Class)
  • [x] .toBeNull()
  • [x] .toBeTruthy()
  • [ ] .toBeUndefined()
  • [ ] .toBeNaN()
  • [ ] .toContain(item)
  • [ ] .toContainEqual(item)
  • [x] .toMatch(regexp | string)
  • [ ] .toMatchObject(object)
  • [ ] .toMatchSnapshot(propertyMatchers?, hint?)
  • [ ] .toMatchInlineSnapshot(propertyMatchers?, inlineSnapshot)
  • [ ] .toStrictEqual(value)
  • [ ] .toThrow(error?)
  • [ ] .toThrowErrorMatchingSnapshot(hint?)
  • [ ] .toThrowErrorMatchingInlineSnapshot(inlineSnapshot)

dtengeri avatar Sep 29 '22 15:09 dtengeri

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Sep 29 '22 15:09 CLAassistant

@rrousselGit I am not sure about the usefulness of toBeFalsy() and toBeTruthy(), I am happy to remove them.

dtengeri avatar Nov 06 '22 06:11 dtengeri

Sorry for the delay. Thanks for this!

rrousselGit avatar Mar 08 '23 12:03 rrousselGit