Make great documentation goal 1.2, and plan the README's reorganisation and the nested-template gaps #33

Open
lilleman wants to merge 966 commits from worktree-todo-relative-dates-exact-counts into main
Showing only changes of commit a82e937412 - Show all commits
+16 -7
View File
@@ -61,11 +61,20 @@ type unhandledNode struct{}
func (*unhandledNode) isNode() {} func (*unhandledNode) isNode() {}
func TestRenderEdgesPanicsOnAnUnhandledNode(t *testing.T) { func TestNodeSwitchesPanicOnAnUnhandledNode(t *testing.T) {
defer func() { for name, call := range map[string]func(){
if r := recover(); r == nil || !strings.Contains(fmt.Sprint(r), "*fejkdata.unhandledNode") { "contained": func() { contained(&unhandledNode{}) },
t.Errorf("renderEdges(unhandledNode) recovered %v, want a panic naming the node kind", r) "paths": func() { paths(&unhandledNode{}) },
} "render": func() { render(nil, &unhandledNode{}, renderScope{}) },
}() "renderEdges": func() { renderEdges(&unhandledNode{}) },
renderEdges(&unhandledNode{}) } {
t.Run(name, func(t *testing.T) {
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()
})
}
} }