2020-03-18 22:29:11 +00:00
|
|
|
package commands
|
|
|
|
|
|
|
|
import (
|
|
|
|
"testing"
|
|
|
|
|
|
|
|
"github.com/stretchr/testify/require"
|
|
|
|
)
|
|
|
|
|
|
|
|
func Test_getCoverageRequirements(t *testing.T) {
|
|
|
|
r := getCoverageRequirements("../testdata/coverage/sum")
|
|
|
|
require.True(t, r.Enabled)
|
|
|
|
require.Equal(t, 90.0, r.Percent)
|
2020-03-22 00:26:50 +00:00
|
|
|
require.Equal(t, []string{"."}, r.Packages)
|
2020-03-18 22:29:11 +00:00
|
|
|
}
|