Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

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.

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.