Microdown
Microdown copied to clipboard
testConvertMicStringToDoc is weak
if the method asHTMLString returns a ' hhh ' it will pass.
testConvertMicStringToDoc
| expectedHtmlDoc |
expectedHtmlDoc := Microdown asHTMLString: MicMicrodownSnippetFactory buildDocument.
self
assert: (expectedHtmlDoc isKindOf: String)
description: 'It tests that result is a String object'.
self
deny: expectedHtmlDoc isEmpty
description: 'It test that result is not empty'.
"parsedContents := (XMLHTMLParser on: expectedHtmlDoc contents) parseDocument.
#('code' 'i' 'a' 'pre' 'strike' 'table' 'ul' 'p') do: [ : tag |
self
assert: ((parsedContents descendantElementsNamed: tag) elementNames notEmpty)
description: 'It test that result contains the expected document tag' ]"`