Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ysmood/got
An enjoyable golang test framework.
https://github.com/ysmood/got
assert dependency-free diff golang lightweight log snapshot-testing test testing unit-testing
Last synced: about 2 months ago
JSON representation
An enjoyable golang test framework.
- Host: GitHub
- URL: https://github.com/ysmood/got
- Owner: ysmood
- License: mit
- Created: 2020-09-29T08:24:35.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2024-06-13T08:40:30.000Z (6 months ago)
- Last Synced: 2024-07-31T20:52:57.948Z (5 months ago)
- Topics: assert, dependency-free, diff, golang, lightweight, log, snapshot-testing, test, testing, unit-testing
- Language: Go
- Homepage: https://pkg.go.dev/github.com/ysmood/got
- Size: 334 KB
- Stars: 264
- Watchers: 4
- Forks: 18
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
- awesome-go - got - An enjoyable golang test framework. (Testing / Testing Frameworks)
- awesome-go-extra - got - 09-29T08:24:35Z|2022-08-25T12:10:18Z| (Testing / Testing Frameworks)
README
# Overview
An enjoyable golang test framework.
## Features
- Pretty output using [gop](https://github.com/ysmood/gop) and [diff](lib/diff)
- Fluent API design that takes the full advantage of IDE
- Handy assertion helpers
- Handy utils for testing
- Value snapshot assertion
- Customizable assertion error output## Guides
Read the [example project](lib/example) to get started.
Got uses itself as the test framework, so the source code itself is the best doc.
Install the [vscode extension](https://marketplace.visualstudio.com/items?itemName=ysmood.got-vscode-extension) for snippets like: `gp`, `gt`, and `gsetup`.
To ensure test coverage of your project, you can run the command below:
```shell
go test -race -coverprofile=coverage.out ./...
go run github.com/ysmood/got/cmd/check-cov@latest
```By default the [check-cov](cmd/check-cov) requires 100% coverage, run it with the `-h` flag to see the help doc.
## API reference
[Link](https://pkg.go.dev/github.com/ysmood/got)