Custom matchers
|
Often a project will want to encapsulate custom matching code for use across multiple specs. Here is how to create a Jasmine-compatible custom matcher. A custom matcher at its root is a comparison function that takes an |
|
|
This object has a custom matcher named "toBeGoofy". |
|
Matcher FactoriesCustom matcher factories are passed a |
|
|
The factory method should return an object with a |
|
|
|