https://github.com/survivorbat/go-watermill-test-logger
Logger for testing with watermill.
https://github.com/survivorbat/go-watermill-test-logger
event go test testing unit watermill
Last synced: about 8 hours ago
JSON representation
Logger for testing with watermill.
- Host: GitHub
- URL: https://github.com/survivorbat/go-watermill-test-logger
- Owner: survivorbat
- License: mit
- Created: 2025-01-20T07:27:43.000Z (9 months ago)
- Default Branch: master
- Last Pushed: 2025-02-04T22:08:37.000Z (8 months ago)
- Last Synced: 2025-02-04T23:19:54.344Z (8 months ago)
- Topics: event, go, test, testing, unit, watermill
- Language: Go
- Homepage: https://pkg.go.dev/github.com/suvivorbat/go-watermill-test-logger
- Size: 4.88 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ⛲️ Watermill Test Logger
Logger for testing with watermill.
## ⬇️ Installation
`go get github.com/survivorbat/go-watermill-test-logger`
## 📋 Usage
```go
package mainimport (
"github.com/stretchr/testify/require"
"github.com/ThreeDotsLabs/watermill/message"
"github.com/survivorbat/go-watermill-test-logger"
)func TestWatermill(t *testing.T) {
// This Will fail the test if any error occurred, and log to the test instance
logger := watertestlogger.NewTestAdaptor(t, true, watermill.LogLevelInfo)router, err := message.NewRouter(message.RouterConfig{}, logger)
require.NoError(t, err)// [...]
}
```## 🔭 Plans
Not much yet.