Skip to content

Instantly share code, notes, and snippets.

@MattMcFarland
Last active March 10, 2018 19:47
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MattMcFarland/32291961e66a02d440d0b7fa157c5f63 to your computer and use it in GitHub Desktop.
Save MattMcFarland/32291961e66a02d440d0b7fa157c5f63 to your computer and use it in GitHub Desktop.
jsverify with mocha
describe('Maths', () => {
it('addition is commutative', () => {
jsc.assertForall(jsc.integer, jsc.integer, (a, b) => a + b === b + a)
// same as:
assert(jsc.checkForall(jsc.integer, jsc.integer, (a, b) => a + b === b + a) === true)
})
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment