mediawiki-extensions-Discus.../tests/cases/appendSignature.json
Bartosz Dziewoński 44f2209abf Trim signatures when added in an empty existing node, too
Add unit tests for appendSignature().

Bug: T276612
Change-Id: Ic44c52f4d54492e092f9396c626380e2637b6f0f
2021-03-08 23:38:46 +00:00

18 lines
635 B
JSON

[
{
"msg": "Simple message",
"html": "<p>Foo bar</p>",
"expected": "<p>Foo bar<span typeof=\"mw:Transclusion\" data-mw=\"{&quot;parts&quot;:[&quot; ~~~~&quot;]}\"></span></p>"
},
{
"msg": "List",
"html": "<p>Foo bar</p><ul><li>A</li><li>B</li></ul>",
"expected": "<p>Foo bar</p><ul><li>A</li><li>B</li></ul><p><span typeof=\"mw:Transclusion\" data-mw=\"{&quot;parts&quot;:[&quot;~~~~&quot;]}\"></span></p>"
},
{
"msg": "Empty trailing paragraph",
"html": "<p>Foo bar</p><p></p>",
"expected": "<p>Foo bar</p><p><span typeof=\"mw:Transclusion\" data-mw=\"{&quot;parts&quot;:[&quot;~~~~&quot;]}\"></span></p>"
}
]