MCPcopy Create free account
hub / github.com/cogentcore/core / TestMD

Function TestMD

htmlcore/md_test.go:14–26  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

12)
13
14func TestMD(t *testing.T) {
15 tests := map[string]string{
16 "h1": `# Test`,
17 "h2": `## Test`,
18 "p": `Test`,
19 `code`: "```go\npackage main\n\nimport \"fmt\"\n\nfunc main() {\n\tfmt.Println(\"Hello, World!\")\n}\n```",
20 }
21 for nm, s := range tests {
22 b := core.NewBody()
23 assert.NoError(t, ReadMDString(NewContext(), b, s))
24 b.AssertRender(t, "md/"+nm)
25 }
26}

Callers

nothing calls this directly

Calls 4

AssertRenderMethod · 0.95
NewBodyFunction · 0.92
ReadMDStringFunction · 0.85
NewContextFunction · 0.70

Tested by

no test coverage detected