spec
spec copied to clipboard
feat: new matchers
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)
@rrousselGit I am not sure about the usefulness of toBeFalsy()
and toBeTruthy()
, I am happy to remove them.
Sorry for the delay. Thanks for this!