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

Generative/fuzz testing #2

Open
okwolf opened this issue Nov 24, 2017 · 0 comments
Open

Generative/fuzz testing #2

okwolf opened this issue Nov 24, 2017 · 0 comments

Comments

@okwolf
Copy link
Member

okwolf commented Nov 24, 2017

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.

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