Skip to content

Commit 0935418

Browse files
committed
v2.0.1
- change test examples - remove `nodeW3Cvalidator` field in package.json file for correct testing
1 parent fbfd614 commit 0935418

File tree

5 files changed

+16
-80
lines changed

5 files changed

+16
-80
lines changed

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
{
22
"name": "node-w3c-validator",
3-
"version": "2.0.0",
3+
"version": "2.0.1",
44
"description": "Wrapper for The Nu Html Checker (v.Nu)",
55
"main": "./lib/validator.js",
66
"scripts": {
77
"test": "happiness --verbose | snazzy",
8-
"cli-html": "node ./bin/cmd.js -i ./tests/**/*.html -f html -o ./results/cli-api-report.html",
9-
"cli-lint": "node ./bin/cmd.js -i ./tests/**/*.html -f lint",
8+
"cli-html": "node ./bin/cmd.js -i ./tests/html/valid-examples/*.html -f html -o ./results/cli-api-report.html",
9+
"cli-lint": "node ./bin/cmd.js -i ./tests/html/valid-examples/*.html -f lint",
1010
"nodejs-api": "node ./tests/demo.js",
1111
"code-style": "happiness --verbose --fix | snazzy"
1212
},
@@ -17,14 +17,6 @@
1717
"bin",
1818
"lib"
1919
],
20-
"nodeW3Cvalidator": {
21-
"suppressErrors": [
22-
"Attribute “href” not allowed"
23-
],
24-
"suppressWarnings": [
25-
"Consider adding a “lang” attribute to the “html” start tag"
26-
]
27-
},
2820
"repository": {
2921
"type": "git",
3022
"url": "git+https://github.com/dutchenkoOleg/node-w3c-validator.git"

tests/demo.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const nodeW3CValidator = require('../lib/validator');
1616
// Private
1717
// ----------------------------------------
1818

19-
const testFilePath = path.join(__dirname, '/**/*.html');
19+
const testFilePath = path.join(__dirname, '/html/valid-examples/*.html');
2020
const resultFolder = path.join(__dirname, '../results/nodejs-api-report.html.html');
2121

2222
// ----------------------------------------

tests/html/example2.html

Lines changed: 0 additions & 57 deletions
This file was deleted.

tests/html/example1.html renamed to tests/html/valid-examples/img-loading-attr.html

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
1-
21
<!doctype html>
3-
<html>
2+
<html lang="en">
43
<head>
54
<title>Example Domain</title>
6-
75
<meta charset="utf-8" />
8-
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
96
<meta name="viewport" content="width=device-width, initial-scale=1" />
10-
<style type="text/css">
7+
<style>
118
body {
129
background-color: #f0f0f2;
1310
margin: 0;
@@ -26,6 +23,12 @@
2623
color: #38488f;
2724
text-decoration: none;
2825
}
26+
.demo {
27+
text-align: center;
28+
}
29+
.demo + .demo {
30+
margin-top: 300vh;
31+
}
2932
@media (max-width: 700px) {
3033
body {
3134
background-color: #fff;
@@ -42,11 +45,9 @@
4245

4346
<body>
4447
<div>
45-
<h1>Example Domain</h1>
46-
<p>This domain is established to be used for illustrative examples in documents. You may use this
47-
domain in examples without prior coordination or asking for permission.</p>
48-
<p><a href="http://www.iana.org/domains/example">More information...</a></p>
49-
<div href="#invalid">Invalid Link</div>
48+
<h1><code>&lt;img></code> loading attribute example</h1>
49+
<p class="demo"><img src="https://via.placeholder.com/150" loading="lazy" alt=""></p>
50+
<p class="demo"><img src="https://via.placeholder.com/200" loading="lazy" alt=""></p>
5051
</div>
5152
</body>
5253
</html>

0 commit comments

Comments
 (0)