Skip to content

Commit 4ca7455

Browse files
committed
Adapt tests for the new vnu-jar version
1 parent 8c98f2a commit 4ca7455

9 files changed

Lines changed: 11 additions & 11 deletions

File tree

test/checkstyle_test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ describe('checkstyle reporter', () => {
2424
'\t\t<error line="1" column="16" severity="error" message="Start tag seen without seeing a doctype first. Expected “&lt;!DOCTYPE html&gt;”." source="htmllint.ValidationError" />',
2525
'\t\t<error line="9" column="96" severity="error" message="Attribute “unknownattr” not allowed on element “img” at this point." source="htmllint.ValidationError" />',
2626
'\t\t<error line="9" column="96" severity="error" message="An “img” element must have an “alt” attribute, except under certain conditions. For details, consult guidance on providing text alternatives for images." source="htmllint.ValidationError" />',
27-
'\t\t<error line="11" column="19" severity="error" message="The “clear” attribute on the “br” element is obsolete. Use CSS instead." source="htmllint.ValidationError" />',
27+
'\t\t<error line="11" column="17" severity="error" message="The “clear” attribute on the “br” element is obsolete. Use CSS instead." source="htmllint.ValidationError" />',
2828
'\t</file>',
2929
'</checkstyle>'
3030
].join('\n');

test/fixtures/invalid-encoding.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!DOCTYPE html>
22
<html lang="es" xmlns="http://www.w3.org/1999/xhtml">
33
<head>
4-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
4+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
55
<title>Página de Ejemplo</title>
66
</head>
77
<body>

test/fixtures/invalid.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
<img id="project-icon" src="images/transparent_1x1.png" class="ui-state-default" unknownAttr="">
1010

11-
<br clear="both" />
11+
<br clear="both">
1212

1313
</body>
1414
</html>

test/fixtures/invalid.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
<img id="project-icon" src="images/transparent_1x1.png" class="ui-state-default" unknownAttr="">
1111

12-
<br clear="both" />
12+
<br clear="both">
1313

1414
</body>
1515
</html>

test/fixtures/valid.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
<img id="project-icon" src="images/transparent_1x1.png" class="ui-state-default" alt="default">
1212

13-
<br style="clear:both" />
13+
<br style="clear:both">
1414

1515
</body>
1616
</html>

test/helpers/expected_results.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ module.exports = {
2929
},
3030
{
3131
lastLine: 11,
32-
lastColumn: 19,
32+
lastColumn: 17,
3333
type: 'error',
3434
message: 'The “clear” attribute on the “br” element is obsolete. Use CSS instead.',
3535
file
@@ -67,7 +67,7 @@ module.exports = {
6767
},
6868
{
6969
lastLine: 11,
70-
lastColumn: 19,
70+
lastColumn: 17,
7171
type: 'error',
7272
message: 'The \'clear\' attribute on the \'br\' element is obsolete. Use CSS instead.',
7373
file

test/html_test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,14 +74,14 @@ describe('htmllint', () => {
7474
type: 'error',
7575
message: 'Internal encoding declaration “iso-8859-1” disagrees with the actual encoding of the document (“utf-8”).',
7676
lastLine: 4,
77-
lastColumn: 74
77+
lastColumn: 72
7878
},
7979
{
8080
file: path.normalize('test/fixtures/invalid-encoding.html'),
8181
type: 'error',
8282
message: 'Bad value “text/html; charset=iso-8859-1” for attribute “content” on element “meta”: “charset=” must be followed by “utf-8”.',
8383
lastLine: 4,
84-
lastColumn: 74
84+
lastColumn: 72
8585
}];
8686

8787
run(options, expected, '', done);

test/junit_test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ describe('junit reporter', () => {
3030
'1 line 1, char 16: Start tag seen without seeing a doctype first. Expected “&lt;!DOCTYPE html&gt;”.',
3131
'2 line 9, char 96: Attribute “unknownattr” not allowed on element “img” at this point.',
3232
'3 line 9, char 96: An “img” element must have an “alt” attribute, except under certain conditions. For details, consult guidance on providing text alternatives for images.',
33-
'4 line 11, char 19: The “clear” attribute on the “br” element is obsolete. Use CSS instead.',
33+
'4 line 11, char 17: The “clear” attribute on the “br” element is obsolete. Use CSS instead.',
3434
'</error>',
3535
'</testcase>',
3636
'</testsuite>'

test/reporters_test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ describe('reporters', () => {
3030
`${invalidHtml} [L1:C16] Start tag seen without seeing a doctype first. Expected “<!DOCTYPE html>”.`,
3131
`${invalidHtml} [L9:C96] Attribute “unknownattr” not allowed on element “img” at this point.`,
3232
`${invalidHtml} [L9:C96] An “img” element must have an “alt” attribute, except under certain conditions. For details, consult guidance on providing text alternatives for images.`,
33-
`${invalidHtml} [L11:C19] The “clear” attribute on the “br” element is obsolete. Use CSS instead.`
33+
`${invalidHtml} [L11:C17] The “clear” attribute on the “br” element is obsolete. Use CSS instead.`
3434
].join('\n');
3535
const actual = stripAnsi(reporter(result));
3636

0 commit comments

Comments
 (0)