test.check is a Clojure property-based testing tool inspired by QuickCheck. The core idea of test.check is that instead of enumerating expected input and output for unit tests, you write properties about your function that should hold true for all inputs. This lets you write concise, powerful tests.
npm install checkers --save
var checkers = ;var gen = checkersgen;// Property is incorrectcheckers;// Property is now correctcheckers;// Check property with a particular seedcheckers;
Usage with Mocha
Checkers comes with a helper function to make writing tests for mocha simpler.
var checking = ;var gen = checkinggen;;
The count is optional, and defaults to 1000. The extra options are also optional.
More coming soon!
For now you'll have to rely on the examples in the
- Generator tests
- Generator docs
- Sugar for other testing frameworks?
- Better examples
npm run or
package.json for a list of available scripts.
You will need leiningen in order to build locally.
Distributed under the Eclipse Public License.
checkers is Copyright © 2015 Glen Mailer and contributors.
test.check is Copyright Rich Hickey, Reid Draper and contributors.