Skip to content

Commit

Permalink
feat(jest): add compatibility with jest
Browse files Browse the repository at this point in the history
  • Loading branch information
JamieMason committed Jan 18, 2017
1 parent d142b6f commit 0654bcc
Show file tree
Hide file tree
Showing 5 changed files with 427 additions and 268 deletions.
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@
[![Code Climate](https://img.shields.io/codeclimate/github/JamieMason/Jasmine-Matchers.svg?style=flat-square)](https://codeclimate.com/github/JamieMason/Jasmine-Matchers)
[![Analytics](https://ga-beacon.appspot.com/UA-45466560-5/jasmine-matchers?flat&useReferer)](https://github.com/igrigorik/ga-beacon)

A huge library of test assertion matchers for a range of common use-cases, to improve the readability of tests written using the [Jasmine testing framework](http://jasmine.github.io/) from [Pivotal Labs](http://pivotallabs.com/).
|**What**|A huge library of test matchers for a range of common use-cases, compatible with all versions of [Jasmine](http://jasmine.github.io/) and [Jest](http://facebook.github.io/jest/).|
|---|:---|
|**Why**|Custom Matchers make tests easier to read and produce relevant and useful messages when they fail.|
|**How**|By avoiding vague messages such as _"expected false to be true"_ in favour of useful cues such as _"expected 3 to be even number"_ and avoiding implementation noise such as `expect(cycleWheels % 2 === 0).toEqual(true)` in favour of simply stating that you `expect(cycleWheels).toBeEvenNumber()`.|

1. **Make failing tests easier to debug** by avoiding vague messages such as _"expected false to be true"_ in favour of useful cues such as _"expected 3 to be even number"_.
2. **Make tests easier to read** by avoiding implementation noise such as `expect(cycleWheels % 2 === 0).toEqual(true)` in favour of simply stating that you `expect(cycleWheels).toBeEvenNumber()`.
> Jasmine Matchers is written using the [add-matchers](https://github.com/JamieMason/add-matchers) library. If you have some useful matchers of your own that you could share with other Jest and Jasmine users, please give it a try.
## Sponsors

Expand Down
Loading

0 comments on commit 0654bcc

Please sign in to comment.