Generative/fuzz testing
Opened this issue · 0 comments
okwolf commented
This is beyond the complexity of what's currently in scope for the library, but I'm capturing what the API might look like anyway.
Proposal based on example from elm-test
:
export default {
"The String module": {
reverse: {
"has no effect on a palindrome": [reverse("hannah"), "hannah"],
"reverses a known string": [reverse("ABCDEFG"), "GFEDCBA"],
"restores the original string if you run it again": [
gen => gen.asciiString(),
original => [reverse(reverse(original)), original]
]
}
}
};
TestCheck.js has an API that is worth looking at for value generators.