Skip to content

Commit

Permalink
Add quick mention of '.not' matcher inversion.
Browse files Browse the repository at this point in the history
  • Loading branch information
xian committed Mar 4, 2010
1 parent 7721f47 commit 581d948
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.markdown
Expand Up @@ -116,6 +116,10 @@ Jasmine has several built-in matchers. Here are a few:
>
>`expect(x).toContain(y);` passes if array or string `x` contains `y`
Every matcher's criteria can be inverted by prepending `.not`:

>`expect(x).not.toEqual(y);` compares objets or primitives `x` and `y` and passes if they are *not* equivalent
#### Writing New Matchers

We've provided a small set of matchers that cover many common situations. However, we recommend that you write custom matchers when you want to assert a more specific sort of expectation. Custom matchers help to document the intent of your specs, and can help to remove code duplication in your specs.
Expand Down

0 comments on commit 581d948

Please sign in to comment.