Skip to content

1.3.0.0

Choose a tag to compare

@pujoheadsoft pujoheadsoft released this 02 Jan 16:31
· 38 commits to main since this release

v1.3.0.0

Enhancements

Type-Safe Mock Result:
Generated mock helpers (e.g., _readFile) now return a specific MockResult params type instead of the mock function itself. This change allows the compiler to carry parameter type information into the verification block (expects), enabling robust compile-time safety and type inference.

Breaking Changes

Generated Helper Return Type:

  • Before: Helpers returned the mock function (MockT m (FunctionType)).
  • After: Helpers return a verification token (MockT m (MockResult params)).

Code that relied on using the return value of makeMock generated helpers as a function (e.g. fn <- _helper ...) will need to be updated. For most users using standard runMockT blocks, this change is transparent, but type safety is significantly improved.

This change is part of an ongoing effort to make misuse of mocks impossible at the type level.