mirror of
https://github.com/mgechev/revive.git
synced 2025-11-29 22:28:23 +02:00
fix:ignore color marks when compare stings in test (#926)
This commit is contained in:
committed by
GitHub
parent
bcae8c78ca
commit
25ae73a67a
@@ -4,6 +4,7 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
|
"github.com/fatih/color"
|
||||||
"github.com/mgechev/revive/config"
|
"github.com/mgechev/revive/config"
|
||||||
"github.com/mgechev/revive/lint"
|
"github.com/mgechev/revive/lint"
|
||||||
"github.com/mgechev/revive/revivelib"
|
"github.com/mgechev/revive/revivelib"
|
||||||
@@ -45,6 +46,7 @@ func TestReviveFormat(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// ACT
|
// ACT
|
||||||
|
color.NoColor = true
|
||||||
failures, exitCode, err := revive.Format("stylish", failuresChan)
|
failures, exitCode, err := revive.Format("stylish", failuresChan)
|
||||||
// ASSERT
|
// ASSERT
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user