Skip to content

Commit

Permalink
Added failing test for Munawwar#10.
Browse files Browse the repository at this point in the history
  • Loading branch information
papandreou committed Nov 24, 2014
1 parent 3b08293 commit f44dbab
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/doctype.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<!DOCTYPE html>
<html>
<head><title>The title</title></head>
<body>
<p>The body</p>
</body>
</html>
8 changes: 8 additions & 0 deletions test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,14 @@ describe('run no conflict sub-template test', function () {
});
});

describe('doctype/complete document test', function () {
var html = fetch('test/doctype.html'),
outputHtml = new Htmlizer(html, {noConflict: true}).toString();
it('it should contain the <!DOCTYPE> when reserialized', function () {
assert.ok(/^<!DOCTYPE/.test(outputHtml));
});
});

/*Utility functions*/
function fetch(pathToTextFile) {
return fs.readFileSync(pathToTextFile, {encoding: 'utf8'});
Expand Down

0 comments on commit f44dbab

Please sign in to comment.