INNER CODE UNIT · Go

TestCollapse_NoFirstChild

JohannesKaufmann/html-to-markdown · collapse/collapse_test.go:30

func TestCollapse_NoFirstChild(t *testing.T) {
	boldNode := &html.Node{
		Type: html.ElementNode,
		Data: "strong",
	}

	Collapse(boldNode, nil)

	tester.ExpectRepresentation(t, boldNode, "after", `strong`)
}

func TestCollapse_StartWithCode(t *testing.T) {
	textNode := &html.Node{
		Type: html.TextNode,
		Data: "  text  ",
	}
	codeNode := &html.Node{
		Type: html.ElementNode,

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…