Created
March 15, 2017 00:14
-
-
Save MattMcFarland/61f8134f49fdefb0ba3b39d772621f95 to your computer and use it in GitHub Desktop.
js verify with chance
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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