mirror of
https://github.com/gohugoio/hugo.git
synced 2026-08-24 07:18:54 +00:00
Improve error handling/messages in Hugo Pipes
Fixes #14257 Closes #14270
This commit is contained in:
@@ -17,6 +17,7 @@ import (
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
qt "github.com/frankban/quicktest"
|
||||
"github.com/gohugoio/hugo/hugolib"
|
||||
)
|
||||
|
||||
@@ -118,8 +119,9 @@ CONTENT
|
||||
|
||||
files = strings.ReplaceAll(files, `2`, `"x"`)
|
||||
|
||||
b, _ = hugolib.TestE(t, files)
|
||||
b.AssertLogMatches(`error calling ToHTML: startLevel: unable to cast "x" of type string`)
|
||||
b, err := hugolib.TestE(t, files)
|
||||
b.Assert(err, qt.Not(qt.IsNil))
|
||||
b.Assert(err.Error(), qt.Contains, `error calling ToHTML: startLevel: unable to cast "x" of type string`)
|
||||
}
|
||||
|
||||
func TestHeadingsNilpointerIssue11843(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user