Skip to content

Generative/fuzz testing #2

Description

@okwolf

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions