From feca3e5780fa5ad377b614ebbb59ac7fc3488699 Mon Sep 17 00:00:00 2001 From: zilongshanren Date: Wed, 17 Aug 2016 14:28:39 +0800 Subject: [PATCH] add more tests --- test/qunit/unit/test-html-text-parser.js | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/test/qunit/unit/test-html-text-parser.js b/test/qunit/unit/test-html-text-parser.js index f94a556292..29b4defde3 100644 --- a/test/qunit/unit/test-html-text-parser.js +++ b/test/qunit/unit/test-html-text-parser.js @@ -174,6 +174,20 @@ test('Event test', function() { style: {} }], "Failed path: Size with event"); + var invalidEventTestString4 = "hello world"; + deepEqual(parser.parse(invalidEventTestString5), + [{text: "hello world", + style: {size: 20, + event: {}} + }], "Failed path: event name quote not match."); + }); @@ -245,7 +259,7 @@ test('Integrate test', function() { }); test('bold/italic/underline test', function () { - var stringWithBold = "hello world"; + var stringWithBold = "hello world"; deepEqual(parser.parse(stringWithBold), [{text: "hello world", style: {bold: true}}], "bold test");