Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/tinymce/dispute

Composable equality and pretty-printing for TypeScript. Useful for building test assertion libraries.
https://github.com/tinymce/dispute

equality fp testing-library typeclasses

Last synced: 3 months ago
JSON representation

Composable equality and pretty-printing for TypeScript. Useful for building test assertion libraries.

Awesome Lists containing this project

README

        

Dispute
=======

This library contains the following basic [type classes]([email protected]:tinymce/dispute.git):

- Eq - equality
- Show - printing values as literals for debugging
- Pprint - pretty-printing values
- Testable - Eq and Pprint

Testable is useful for test assertion libraries. You can use Dispute functionality test that two values are equal, and if they're not, pretty-print the expected and actual.

Dispute provides instances for common TypeScript types, as well as for `any` types, using type inspection.
It is also extendable to types which can't be compared correctly with type inspection - e.g. church-encoded types.

Dispute is used in the [Bedrock](https://github.com/tinymce/bedrock) test runner.