Make great documentation goal 1.2, and plan the README's reorganisation and the nested-template gaps #33
+1
-10
@@ -2,8 +2,6 @@ package fejkdata
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
|
||||||
"strings"
|
|
||||||
"testing"
|
"testing"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -68,13 +66,6 @@ func TestNodeSwitchesPanicOnAnUnhandledNode(t *testing.T) {
|
|||||||
"render": func() { render(nil, &unhandledNode{}, renderScope{}) },
|
"render": func() { render(nil, &unhandledNode{}, renderScope{}) },
|
||||||
"renderEdges": func() { renderEdges(&unhandledNode{}) },
|
"renderEdges": func() { renderEdges(&unhandledNode{}) },
|
||||||
} {
|
} {
|
||||||
t.Run(name, func(t *testing.T) {
|
mustPanic(t, name, call)
|
||||||
defer func() {
|
|
||||||
if r := recover(); r == nil || !strings.HasPrefix(fmt.Sprint(r), "fejkdata: internal error: ") || !strings.Contains(fmt.Sprint(r), "*fejkdata.unhandledNode") {
|
|
||||||
t.Errorf("recovered %v, want an internal error naming the node kind", r)
|
|
||||||
}
|
|
||||||
}()
|
|
||||||
call()
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user