npm install chape
This exports a helper method, which can be used to check a
jsverify property with
with tape.
If tape is new to you, see http://www.macwright.org/2014/03/11/tape-is-cool.html
for some propaganda.
npm i --save-dev chape
then
``js`
const test = require('tape').test
const jsc = require('jsverify')
const check = require('check')
Simple example, showing something obvious isn't true
`js`
const is_not_zero = function (n) { return n !== 0 }
test('all integers are non-zero', function (t) {
check(jsc.forall('integer', is_not_zero), t)
t.end()
})
The TAP output:
`
TAP version 13all integers are non-zero
not ok 1 property does not hold! found counter example: 0
---
operator: fail
at: Test.t.check (./chape/index.js:12:6)
...
1..1
YMMV, there isn't much going on here, it's just a trivial helper, check the source.