aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2015-02-08 20:05:28 +0000
committerMichael Williamson <mike@zwobble.org>2015-02-08 20:05:28 +0000
commitabf5051a3113f72b9b1f83a0a4b1c5b29be81d33 (patch)
tree8be3dd7d46a1e219674d2f266ef782df26c69180
parenta4caf6ebea423e305d077e343f565a2af1a74780 (diff)
Add test for unrecognised elements in markdown writer
-rw-r--r--tests/writers/markdown-writer.tests.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/writers/markdown-writer.tests.js b/tests/writers/markdown-writer.tests.js
index 6623074..f38bd90 100644
--- a/tests/writers/markdown-writer.tests.js
+++ b/tests/writers/markdown-writer.tests.js
@@ -9,6 +9,14 @@ describe('markdown-writer', function() {
writer.text("\\*");
return assert.equal(writer.asString(), "\\\\\\*");
});
+
+ test('unrecognised elements are treated as normal text', function() {
+ var writer = mdWriter.writer();
+ writer.open("blah");
+ writer.text("Hello");
+ writer.close("blah");
+ return assert.equal(writer.asString(), "Hello");
+ });
test('paragraphs are terminated with double new line', function() {
var writer = mdWriter.writer();