Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
js verify with chance
const jsc = require('jsverify')
const Chance = require('chance')
const chance = new Chance()
chance.mixin({
user: () => ({
first: chance.first(),
last: chance.last(),
email: chance.email()
})
})
const arbUser = jsc.bless({
generator: () => chance.user()
})
// lets test our user here:
jsc.check(jsc.forall(arbUser, (user) => {
console.log(user)
return true
}))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment