fix
This commit is contained in:
1 parent
815e26d359
commit
a30b78c3b6
8 files changed
+178
-33
No files matched your search
@@ -48,4 +48,12 @@ func TestDescriptionMissingFormulaHTMLTags(t *testing.T) {
|
||||
if DescriptionMissingFormulaHTMLTags("<h1>T</h1><p>Body</p><ul><li>x</li></ul>", types) {
|
||||
t.Fatal("full HTML must match")
|
||||
}
|
||||
twoH2 := []string{"h2", "p", "h2", "p", "ul"}
|
||||
if !DescriptionMissingFormulaHTMLTags("<h2>A</h2><p>One</p><ul><li>x</li></ul>", twoH2) {
|
||||
t.Fatal("single h2 must fail when formula needs two")
|
||||
}
|
||||
ok := "<h2>A</h2><p>One</p><h2>B</h2><p>Two</p><ul><li>x</li></ul>"
|
||||
if DescriptionMissingFormulaHTMLTags(ok, twoH2) {
|
||||
t.Fatal("two h2 + two p + ul should satisfy")
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user