refactor: use require for testing errors (#1100)

This commit is contained in:
Pete Davison
2023-04-06 11:18:41 +01:00
committed by GitHub
parent cfa409b5e7
commit 719f30219b
6 changed files with 176 additions and 173 deletions

View File

@@ -4,6 +4,7 @@ import (
"testing"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"gopkg.in/yaml.v3"
"github.com/go-task/task/v3/taskfile"
@@ -44,7 +45,7 @@ msg: "1 is not 2"
}
for _, test := range tests {
err := yaml.Unmarshal([]byte(test.content), test.v)
assert.NoError(t, err)
require.NoError(t, err)
assert.Equal(t, test.expected, test.v)
}
}