Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/tinymce/dispute
- Owner: tinymce
- License: other
- Created: 2019-12-17T05:24:37.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2023-08-15T01:03:08.000Z (over 1 year ago)
- Last Synced: 2023-08-15T03:37:17.328Z (over 1 year ago)
- Topics: equality, fp, testing-library, typeclasses
- Language: TypeScript
- Size: 415 KB
- Stars: 4
- Watchers: 12
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.txt
- Codeowners: .github/CODEOWNERS
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 PprintTestable 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.