Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tisonkun/assert
A toolkit with common assertions that plays nicely with the standard library.
https://github.com/tisonkun/assert
assertions go golang testing testkit
Last synced: 21 days ago
JSON representation
A toolkit with common assertions that plays nicely with the standard library.
- Host: GitHub
- URL: https://github.com/tisonkun/assert
- Owner: tisonkun
- License: apache-2.0
- Created: 2022-03-18T13:15:34.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-12-21T04:47:48.000Z (about 2 years ago)
- Last Synced: 2024-12-02T07:55:16.462Z (25 days ago)
- Topics: assertions, go, golang, testing, testkit
- Language: Go
- Homepage:
- Size: 277 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Assert
## Description
This package is heavily inspired from [stretchr/testify](https://github.com/stretchr/testify), and you can regard it as a fork of the upstream repository.
This package extracts all assertions and republish them with new ones including:
* `(*Assertion).ErrorRegexp`
The `Assert` package servers as a supplement of Golang's `testing` for convenient assertions. And thus I don't want to implement anything like `suite` or `mock`.
* `suite` can be simply implemented leveraging [Golang's Subtests](https://go.dev/blog/subtests).
* `mock` is not a good practice as it's hard to sync logics between the mock and the real object.## Usage
```shell
go get github.com/tisonkun/assert
```## Copyright & License
The bundle itself is licensed under the [Apache License](LICENSE).
Copyright 2022 tison [email protected].
You can see all transitive licenses and notices under the [LICENSES](LICENSES) folder.