Skip to content

Instantly share code, notes, and snippets.

@matthewleon
Created May 30, 2015 15:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save matthewleon/a205970ce3cefa15f08a to your computer and use it in GitHub Desktop.
Save matthewleon/a205970ce3cefa15f08a to your computer and use it in GitHub Desktop.
mocha jsverify shrink failure
jsc = require('jsverify');
(function() {
arbitraryPositiveInteger = jsc.nat.smap(
function (n) {return n + 1;},
function (n) {return n - 1;}
);
describe('test with arbitrary array and two smapped arbitrary params',
function() {
jsc.property('does not shrink',
jsc.array(jsc.nat), arbitraryPositiveInteger, arbitraryPositiveInteger,
function(array, int1, int2) {
return false; // fail
}
);
});
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment