diff options
| author | Michael Williamson <mike@zwobble.org> | 2014-04-10 14:28:13 +0100 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2014-04-10 14:28:13 +0100 |
| commit | 91eb47cc9c8b82bc171f818046c8100e3420a2b2 (patch) | |
| tree | 61254ae4e6a2f9e9b749cf1c9474971592f3c26c /tests | |
| parent | 8fcdf02810e5880fe58d1308c80142cbc936c9e3 (diff) | |
Indent self-closing elements
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/html-writer.tests.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/html-writer.tests.js b/tests/html-writer.tests.js index dc6cb1c..de8b76f 100644 --- a/tests/html-writer.tests.js +++ b/tests/html-writer.tests.js @@ -58,4 +58,12 @@ describe('html-writer', function() { writer.close("p"); return assert.equal(writer.asString(), "<p>\n One\n Two\n</p>"); }); + + test('self closing elements are indented', function() { + var writer = htmlWriter.writer({prettyPrint: true}); + writer.open("p"); + writer.selfClosing("br"); + writer.close("p"); + return assert.equal(writer.asString(), "<p>\n <br />\n</p>"); + }); }) |
