Skip to content

Expose programmatic API #16

@graue

Description

@graue

In lib/Property.js, there's an interface that could allow people to write their own test runners and use Gentest solely as a library. It implements all the interesting stuff in Gentest in a purely functional way: defining properties with the forAll sugar, generating test cases for a property, running a test case against a property, and shrinking a failing test case (via an iterator, so the process can be stopped or paused at any step).

All that needs to be done is to:

  • Expose this API publicly.
  • Provide a way to go from the opaque "test case" type returned by genTest and consumed by runTest (which is, secretly, a tree) to a POJO, for display/logging.
  • Ideally, document this API somewhere other than in the source.

(Among the benefits: This could provide a basis for adapters to use Gentest within Jasmine/Mocha/QUnit test suites.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions