Andrei Pfeiffer
Aug 25, 2017 · 1 min read

Of course, you could create a custom matcher if you use it multiple times. I just wanted to explain the implementation.

Also, those built in matchers, once you understand how they work, can be mixed in any way to achieve complex expectations, that are non trivial to be extracted as a custom matcher. IE: objects containing objects, or arrays containing arrays, for example.

)

    Andrei Pfeiffer

    Written by

    code designer, tim.js meetup organizer, speaker, trainer