jest-unexpected
API
expect
toBe
toBeDefined
toBeFalsy
toBeInstanceOf
toBeTruthy
toBeUndefined
toContain
toContainEqual
toHaveBeenCalled
toHaveBeenCalledTimes
toHaveBeenCalledWith
toHaveBeenLastCalledWith
toHaveBeenNthCalledWith
toHaveLastReturnedWith
toHaveNthReturnedWith
toHaveProperty
toHaveReturned
toHaveReturnedTimes
toHaveReturnedWith
toMatch
toMatchObject.
toStrictEqual
.toBeInaceOf()
This assertion checks a subject is a particular type.
const
promise
=
Promise
.
resolve
();
jestUnexpected
(
promise
).
toBeInstanceOf
(
Error
);
expected
Promise
to be a
Error