May 2019
Intermediate to advanced
496 pages
10h 38m
English
Wouldn't it be great if we could write this? Check it out:
expect(submitSpy).toHaveBeenCalled();
This is more descriptive than using a toBeDefined() argument on the matcher. It also encapsulates the notion that if receivedArguments hasn't been set, then it hasn't been called.
Let's write our first Jest matcher.
Read now
Unlock full access