mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-01-10 03:47:03 +02:00
c91c4b7cd8
- wrap the multiple errors in an internal error with cleaner messaging - improve testlib.RequireTemplateError and several tests
17 lines
353 B
Go
17 lines
353 B
Go
package testlib
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/goreleaser/goreleaser/internal/tmpl"
|
|
"github.com/stretchr/testify/require"
|
|
)
|
|
|
|
// RequireTemplateError requires thqt an error happens and that it is a template error.
|
|
func RequireTemplateError(tb testing.TB, err error) {
|
|
tb.Helper()
|
|
|
|
require.Error(tb, err)
|
|
require.ErrorAs(tb, err, &tmpl.Error{})
|
|
}
|