Skip to content
This repository was archived by the owner on Jul 19, 2023. It is now read-only.

Commit ce9cd77

Browse files
committed
Update test case for new error message format
[22:26:42] w3c-html-validator spec/html/invalid.html fail (messages: 2)
1 parent 7d0de10 commit ce9cd77

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
"step:03": "eslint --max-warnings 0 . --ext .ts",
7474
"step:04": "tsc",
7575
"step:05": "tsc --module UMD --outDir build/umd",
76-
"step:06": "cpy 'build/umd/*.js' build --rename=html-validator.umd.cjs",
76+
"step:06": "cpy build/umd/html-validator.js build --rename=html-validator.umd.cjs",
7777
"step:07": "add-dist-header build dist",
7878
"pretest": "npm-run-all step:*",
7979
"test": "mocha spec --timeout 5000"
@@ -89,7 +89,7 @@
8989
"@types/through2": "~2.0",
9090
"@typescript-eslint/eslint-plugin": "~4.32",
9191
"@typescript-eslint/parser": "~4.32",
92-
"add-dist-header": "~0.0",
92+
"add-dist-header": "~0.1",
9393
"assert-deep-strict-equal": "~0.0",
9494
"cpy-cli": "~3.1",
9595
"eslint": "~7.32",

spec/mocha.spec.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -156,10 +156,10 @@ describe('The gulp-w3c-html-validator reporter()', () => {
156156
it('displays validation messages for an invalid HTML file', (done) => {
157157
const spy = sinon.spy(process.stdout, 'write');
158158
const vinylOptions = {
159-
path: 'spec/html/invalid.html',
160-
cwd: 'spec/',
161-
base: 'spec/html/',
162-
contents: readFileSync('spec/html/invalid.html'),
159+
path: 'spec/html/invalid.html',
160+
cwd: 'spec/',
161+
base: 'spec/html/',
162+
contents: readFileSync('spec/html/invalid.html'),
163163
w3cHtmlValidator: analyzedFiles.invalid[0].w3cHtmlValidator,
164164
};
165165
const mockFile = new Vinyl(vinylOptions);
@@ -168,7 +168,7 @@ describe('The gulp-w3c-html-validator reporter()', () => {
168168
const handleEndOfStream = () => {
169169
// To view raw output: console.log(spy.secondCall.args);
170170
spy.restore();
171-
const headerLine = /spec\/html\/invalid.html.*validation:.*fail \(messages: 2\)/;
171+
const headerLine = /3c-html-validator.*spec\/html\/invalid.html.*fail \(messages: 2\)/;
172172
const warningLine = /HTML warning:/;
173173
const errorLine = /HTML error:/;
174174
const actual = {

0 commit comments

Comments
 (0)