Skip to content

Commit 75c7f1e

Browse files
committed
Add test for option 'ignoreHtmlComments'
1 parent 489d7c2 commit 75c7f1e

2 files changed

Lines changed: 13 additions & 5 deletions

File tree

test/fixtures/10.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
<!DOCTYPE html>
22
<!-- comments1 -->
33
<html>
4-
<head lang="en">
4+
<!-- comments2 --><head lang="en"><!-- comments3 -->
55
<meta charset="UTF-8">
6-
<title><!-- comments2 --></title>
7-
</head>
6+
<title><!-- comments4 --></title>
7+
</head><!-- comments5 -->
88
<body>
9-
Text<!-- comments3 -->
9+
Text<!-- comments6 -->
1010
</body>
1111
</html>
12-
<!-- comments4 -->
12+
<!-- comments7 -->

test/isEqual.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,4 +84,12 @@ describe('\'isEqual\'', function () {
8484
htmlDiffer.isEqual(files.html1, files.html2).must.be.true();
8585
});
8686

87+
it('must ignore html comments', function() {
88+
var htmlDiffer = new HtmlDiffer(),
89+
90+
files = readFiles('10.html', '_10.html');
91+
92+
htmlDiffer.isEqual(files.html1, files.html2).must.be.true();
93+
});
94+
8795
});

0 commit comments

Comments
 (0)