mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-03-17 20:47:50 +02:00
- 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{})
|
|
}
|