Skip to content

Conversation

@johnchandlerburnham
Copy link
Member

@johnchandlerburnham johnchandlerburnham commented Jan 20, 2026

  • Introduce checkIO as a runtime alternative to check for property-based tests. While check runs during compilation with a fixed seed, checkIO defers execution to runtime with configurable random seeds via cfg.randomSeed.
  • Add describe and context as aliases for group, matching hspec's naming conventions for better test organization and readability
  • Add Gen.frequency combinator for weighted random generation, allowing generators to be selected with specified probabilities
  • Add examples demonstrating both features with property-based tests

  Introduce `checkIO` as a runtime alternative to `check` for property-based
  tests. While `check` runs during compilation with a fixed seed, `checkIO`
  defers execution to runtime with configurable random seeds via
  `cfg.randomSeed`.

  Key changes:
  - Add `isPassed` constructor to `Testable` for tests that pass without
    formal proof (distinguishes SlimCheck successes from inconclusive results)
  - Add `individualIO` constructor to `TestSeq` for deferred IO tests
  - Add `TestSeq.runIO` to execute IO tests at runtime
  - Update `lspecIO` and `lspecEachIO` to use the new IO runner
  - Add comprehensive documentation for the framework
  - Add `describe` and `context` as aliases for `group`, matching hspec's
    naming conventions for better test organization and readability
  - Add `Gen.frequency` combinator for weighted random generation,
    allowing generators to be selected with specified probabilities
  - Add examples demonstrating both features with property-based tests
@johnchandlerburnham johnchandlerburnham changed the title Quality of Life improvments Quality of Life Improvments Jan 20, 2026
@johnchandlerburnham johnchandlerburnham merged commit 1e6da63 into main Jan 21, 2026
5 checks passed
@johnchandlerburnham johnchandlerburnham deleted the jcb/improvements branch January 21, 2026 00:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants