Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support tracking valid cases #26

Open
CodeLenny opened this issue Jun 30, 2017 · 0 comments
Open

Support tracking valid cases #26

CodeLenny opened this issue Jun 30, 2017 · 0 comments

Comments

@CodeLenny
Copy link
Contributor

If a generator can't be modified, often test cases will need to be thrown out. Add an API for tracking run metrics, and testing run statistics in the master test.

Something like:

const jsc = require("jsverify");
jsc.ava = require("ava-verify");

jsc.ava({
  needCases: {
    notZero: 10, // or "10%"
  },
}, [ jsc.int, jsc.int ], (t, a, b) => {
  if(b === 0) {
    t.context._avaVerify.case("notZero");
    return t.pass();
  }
  t.true(a / b < a);
});

Then if notZero disables more than 10 of the runs, a test in the master test would throw an error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant