Skip to content

[TM-268] Add `tasty-hunit-compat` package

Konstantin Ivanov requested to merge martoon/tm268-tasty-hunit-compat into master

Description

Problem: tasty-hunit package does not provide an actual integration of HUnit with tasty, rather defines its own primitives so that it cannot be used with tests written using HUnit. Previously we workarounded this by adding our own implementation in Test.Tasty.HUnit module of morley:morley-test, but this way it could not be used in other subpackages.

Solution: create a separate tasty-hunit-compat package with a proper integration logic.

We use some different logic there comparing to old Test.Tasty.HUnit module; now we can depend on tasty-hunit (previously it was difficult because we want import Test.Tasty.HUnit to automatically refer to our module) and so now we just modify exceptions in our Assertions and then feed them to tasty-hunit's functions.

Related issue(s)

https://issues.serokell.io/issue/TM-268

Checklist for your Merge Request

Related changes (conditional)

  • Tests (see short guidelines)

    • If I added new functionality, I added tests covering it.
    • If I fixed a bug, I added a regression test to prevent the bug from silently reappearing again.
  • Documentation

    • I checked whether I should update the docs and did so if necessary:
    • I updated the changelog if my changes are externally visible.

Stylistic guide (mandatory)

Edited by Konstantin Ivanov

Merge request reports