claire-mocha

A bridge for using Claire in Mocha

This functionality has been moved into Claire's core.
Last updated 8 years ago by killdream .
MIT · Repository · Original npm · Tarball · package.json
$ cnpm install claire-mocha 
SYNC missed versions from official npm registry.

Claire for Mocha

Claire for Mocha is a library that makes it easier to use the [Claire][] property-based testing library in Mocha.

Example

Just use Claire for Mocha's forAll to define your properties:

global <<< require 'claire-mocha'
global <<< (require 'claire').data
{ for-all } = require 'claire'

describe 'Lists' ->
  o 'Concatenation' -> do
                       for-all (List Int), (List Int)
                       .satisfy (xs, ys) -> (xs.length + ys.length) is (xs ++ ys).length

And run Mocha as you normally would:

$ mocha

  List
    ✓ - Concatenation should yield lists with the same size    

Installation

$ npm install claire-mocha

Licence

MIT/X11. ie.: Do whatever you want.

Current Tags

  • 0.2.0                                ...           latest (8 years ago)

4 Versions

  • 0.2.0 [deprecated]           ...           8 years ago
  • 0.1.2 [deprecated]           ...           8 years ago
  • 0.1.1 [deprecated]           ...           8 years ago
  • 0.1.0 [deprecated]           ...           8 years ago
Maintainers (1)
Downloads
Today 0
This Week 1
This Month 4
Last Day 0
Last Week 1
Last Month 3
Dependencies (1)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |