Created
March 15, 2017 00:11
-
-
Save MattMcFarland/41a76d6d74d67a9625d71a42df292e73 to your computer and use it in GitHub Desktop.
chance random and js verify
This file contains hidden or 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