You've already forked goreleaser
mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-07-17 01:42:37 +02:00
test: disable colors on tests
This commit is contained in:
committed by
Carlos Alexandro Becker
parent
7856c691cc
commit
9b0a75d24d
@ -4,10 +4,10 @@ import (
|
|||||||
"bytes"
|
"bytes"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/stretchr/testify/assert"
|
|
||||||
|
|
||||||
"github.com/apex/log"
|
"github.com/apex/log"
|
||||||
"github.com/apex/log/handlers/cli"
|
"github.com/apex/log/handlers/cli"
|
||||||
|
"github.com/fatih/color"
|
||||||
|
"github.com/stretchr/testify/assert"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestNotice(t *testing.T) {
|
func TestNotice(t *testing.T) {
|
||||||
@ -17,6 +17,7 @@ func TestNotice(t *testing.T) {
|
|||||||
log.Info("first")
|
log.Info("first")
|
||||||
Notice("foo.bar.whatever")
|
Notice("foo.bar.whatever")
|
||||||
log.Info("last")
|
log.Info("last")
|
||||||
|
color.NoColor = true
|
||||||
|
|
||||||
assert.Contains(t, out.String(), " • first")
|
assert.Contains(t, out.String(), " • first")
|
||||||
assert.Contains(t, out.String(), " • DEPRECATED: `foo.bar.whatever` should not be used anymore, check https://goreleaser.com/deprecations#foo-bar-whatever for more info.")
|
assert.Contains(t, out.String(), " • DEPRECATED: `foo.bar.whatever` should not be used anymore, check https://goreleaser.com/deprecations#foo-bar-whatever for more info.")
|
||||||
|
Reference in New Issue
Block a user