I have only just started this project so it doesn't do much yet. The idea is to port QuickCheck to JavaScript. I want the port to be as faithful to the original as possible.
quickCheck(forAll(genInt, n =>
classify(n % 2 === 0, 'even', 'odd',
classify(n < 0, 'neg', 'pos',
classify(Math.abs(n) > 50, 'large',
n + n === 2 * n)))));
// +++ OK, passed 100 tests:
// 26% neg, even
// 19% pos, even
// 19% pos, odd
// 17% neg, odd
// 6% large, neg, odd
// 6% large, pos, odd
// 4% large, neg, even
// 3% large, pos, even
implement a generator for a primitive typeimplementsample
to sample the generatorimplement a very basic version ofquickCheckResult
(no shrinking)implement messages (e.g.+++ OK, passed 100 tests.
)- IN PROGRESS: implement generator combinators (e.g.
elements
,oneof
, etc.) - IN PROGRESS: implement property combinators (e.g.
withMaxSuccess
,classify
,collect
, etc.) - IN PROGRESS: implement shrinking
- IN PROGRESS: implenent unit tests
- IN PROGRESS: implement usage examples
- implement more generators
- implement arbitraries
- implement modifiers (e.g. NonEmptyList, Positive, NonZero, etc.)
- implement integration with Mocha
- implement integration with Jasmine
- implement integration with Karma
- exception handling
- QCGen, random, replaying random, etc.
- TypeScript typings for users of zammo
- ES2015 & Flow ? Possible use re picking arbitraries ?
- create gh-pages branch
- create wiki documentation
- Running tests:
stdArgs,quickCheck,quickCheckWith,quickCheckWithResult,quickCheckResult,verboseCheck,verboseCheckWith,verboseCheckWithResult,verboseCheckResult - Gen combinators:
constant1,choose,oneof,frequency,elements, growingElements,sized,getSize,resize, scale,suchThat,suchThatMap,suchThatMaybe,listOf,listOf1,vectorOf, infiniteListOf, shuffle, sublistOf,generate - Property combinators:
forAll,forAllShrink, shrinking,noShrinking,==>, ===, total,verbose,once,again,withMaxSuccess, within, .&., .&&., conjoin, .||., disjoin,counterexample,whenFail,whenFail',expectFailure,label,collect,classify,cover, mapSize
1 although constant
is not part of QuickCheck, it is included here as a counterpart to
const in ScalaCheck.