Changelog of @hackage/skeletest 0.4.2

v0.4.2

Bug fixes:

  • Fix exporting P.anythingDeep / P.anyThunk

API changes:

  • Add P.throwsAny

v0.4.1

Bug fixes:

  • Fix snapshots for manual tests detected as outdated when no test selections are specified on the command line

v0.4.0

New features:

  • Long tests now display the duration of the test (#23)
  • Summary of test results now displayed at end of test (#21)
  • Added --format for customizing the report format; --format=minimal is now the default in a terminal that supports ANSI

API changes:

  • Re-designed how hooks are defined
  • New hooks:
    • runSpecs
    • modifyTestSummary
    • onTestFailure
  • New P.empty predicate for checking empty lists/texts/etc.
  • Add HasSubsequences instance for lazy Text
  • Remove field prefixes from more constructors (FlagSpec, TestResult, SpecInfo)
  • Change testResultSuccess from Bool to TestResultStatus
  • P.anything now forces its argument to WHNF
    • Added P.anythingDeep for forcing its argument deeply
    • Added P.anyThunk to recover the old behavior
  • New skipTest function for skipping tests at runtime

Runtime changes:

  • Sanitize a literal "```" line in snapshots (#27)
  • Show diff when snapshot doesn't exist also (#51)
  • Only update snapshots if test passed (#25)
  • Standardize exit codes
  • Error if no tests were selected
  • If there are any outdated snapshot files, --update now updates/removes them. The test suite fails if --update is not specified. (#24)
  • Snapshots are now ordered by test order (#26)
    • Will not reorder existing snapshot files until at least one snapshot in the file has changed and forces a write to the file. To force reorder everything, run find ./test -name '*.snap.md' | xargs rm -rf and rerun with --update.
  • Snapshot headers now use as the group delimiter
    • Slashes are now safe in group/test names in snapshot files
    • is properly sanitized if used in group/test names
    • Snapshot files will re-render with the new delimiter when a snapshot changes. Delete all snapshot files to force rerendering

v0.3.7

New features:

  • Support repeated CLI flags with MultiFlag

Runtime changes:

  • Fix --foo=bar to error when --foo is a SwitchFlag
    • Previously, it would silently add bar as a positional argument
  • Allow multiple short CLI flags in one option
    • -abc would be parsed as -a -b -c if all are switch flags
    • -abc would be parsed as -a -b c if -a is a switch flag and -b is an argument flag

v0.3.6

Runtime changes:

  • Render exceptions in property tests the same as unit tests
  • If property configuration (e.g. Prop.setDiscardLimit) occurs after forAll or IO actions, it now errors instead of silently being ignored
  • Support MonadFail in prop
  • Add SKELETEST_TEST_ROOT env var

v0.3.5

Runtime changes:

  • Fix circular dependency error when a session-scoped fixture errors (#72)
  • Fix P.matchesSnapshot when test changes CWD (#44)
  • Fix test failure messages when running test executable from different directory (#74)

v0.3.4

API changes:

  • Replace hookModifyFileSpecs with hookModifySpecRegistry
  • Remove field prefixes from many constructors (e.g. Hooks, TestInfo, etc.)
  • Turn on NoFieldSelectors everywhere
  • Add focus for focusing a specific test (#58)

v0.3.3

Configuration:

  • Add -optF=main:_ option for configuring the name of the main module/function (#64)

API changes:

  • Added shouldReturn

Runtime changes:

  • Fix gray text output, using standard ANSI codes instead of a hardcoded RGB value

v0.3.2

API changes:

  • Added hookModifyFileSpecs to Hooks (#59)

v0.3.1

API changes:

  • Re-export BoxSpec and BoxContent from Skeletest.Plugin

Runtime changes:

  • Tweak formatting of test failures/errors

v0.3.0

GHC support:

  • Support GHC 9.14

New features:

  • Automatically capture stdout/stderr (#1)

API changes:

  • Specify order of type variables for P.anything so that P.anything @Int works

Runtime changes:

  • Add location to error messages
  • Render test failures/errors in more visible box
  • Display the path of the test file instead of guessing a module name (#40)
  • Flush stdout so test name is displayed while test is still running

v0.2.1

  • Add P.list

v0.2.0

  • Move setting properties to Skeletest.Prop
  • Add coverage functions for property tests

v0.1.1

  • Support Diff-1.0
  • Support GHC 9.12, drop support for GHC 9.6

v0.1.0

Initial release