Skip to content

Commit 328235d

Browse files
mdevilsAlexej Yaroshevich
authored andcommitted
Fix tests with new plugin support
1 parent ae34c69 commit 328235d

11 files changed

+44
-20
lines changed

test/lib/rules/validate-jsdoc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ var assert = require('assert');
22

33
describe('lib/rules/validate-jsdoc', function () {
44
var checker = global.checker({
5-
plugins: ['.']
5+
plugins: ['./lib/index']
66
});
77

88
describe('configure', function () {

test/lib/rules/validate-jsdoc/check-param-names.js

Lines changed: 27 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
describe('lib/rules/validate-jsdoc/check-param-names', function() {
22
var checker = global.checker({
3-
plugins: ['.']
3+
plugins: ['./lib/index']
44
});
55

66
describe('not configured', function() {
@@ -145,7 +145,13 @@ describe('lib/rules/validate-jsdoc/check-param-names', function() {
145145
}
146146
},
147147
errors: [
148-
{message: 'parameters xxx and yyy are out of order', column: 10, line: 2, rule: "jsDoc"}
148+
{
149+
message: 'parameters xxx and yyy are out of order',
150+
column: 10,
151+
line: 2,
152+
rule: "jsDoc",
153+
filename: "input"
154+
}
149155
]
150156
}, {
151157
it: 'should report out of order many times',
@@ -161,8 +167,20 @@ describe('lib/rules/validate-jsdoc/check-param-names', function() {
161167
};
162168
},
163169
errors: [
164-
{message: 'parameters xxx and zzz are out of order', column: 14, line: 3, rule: "jsDoc"},
165-
{message: 'parameters yyy and xxx are out of order', column: 14, line: 4, rule: "jsDoc"}
170+
{
171+
message: 'parameters xxx and zzz are out of order',
172+
column: 14,
173+
line: 3,
174+
rule: "jsDoc",
175+
filename: "input"
176+
},
177+
{
178+
message: 'parameters yyy and xxx are out of order',
179+
column: 14,
180+
line: 4,
181+
rule: "jsDoc",
182+
filename: "input"
183+
}
166184
]
167185
}, {
168186
it: 'should report out of order and expected',
@@ -177,8 +195,8 @@ describe('lib/rules/validate-jsdoc/check-param-names', function() {
177195
};
178196
},
179197
errors: [
180-
{message: 'parameter xxx is out of order', column: 14, line: 3, rule: "jsDoc"},
181-
{message: 'expected xxx but got yyy', column: 14, line: 4, rule: "jsDoc"}
198+
{message: 'parameter xxx is out of order', column: 14, line: 3, rule: "jsDoc", filename: "input"},
199+
{message: 'expected xxx but got yyy', column: 14, line: 4, rule: "jsDoc", filename: "input"}
182200
]
183201
}, {
184202
it: 'should report out of order and expected v2',
@@ -193,8 +211,8 @@ describe('lib/rules/validate-jsdoc/check-param-names', function() {
193211
};
194212
},
195213
errors: [
196-
{message: 'expected yyy but got xxx', column: 14, line: 3, rule: "jsDoc"},
197-
{message: 'parameter yyy is out of order', column: 14, line: 4, rule: "jsDoc"}
214+
{message: 'expected yyy but got xxx', column: 14, line: 3, rule: "jsDoc", filename: "input"},
215+
{message: 'parameter yyy is out of order', column: 14, line: 4, rule: "jsDoc", filename: "input"}
198216
]
199217
}, {
200218
it: 'should not report out of order but expected',
@@ -209,7 +227,7 @@ describe('lib/rules/validate-jsdoc/check-param-names', function() {
209227
};
210228
},
211229
errors: [
212-
{message: 'expected zzz but got xxx', column: 14, line: 3, rule: "jsDoc"}
230+
{message: 'expected zzz but got xxx', column: 14, line: 3, rule: "jsDoc", filename: "input"}
213231
]
214232

215233
}, {

test/lib/rules/validate-jsdoc/check-redundant-access.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
describe('lib/rules/validate-jsdoc/check-redundant-access', function () {
22
var checker = global.checker({
3-
plugins: ['.']
3+
plugins: ['./lib/index']
44
});
55

66
describe('not configured', function() {

test/lib/rules/validate-jsdoc/check-redundant-params.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
describe('lib/rules/validate-jsdoc/check-redundant-params', function () {
22
var checker = global.checker({
3-
plugins: ['.']
3+
plugins: ['./lib/index']
44
});
55

66
describe('not configured', function() {

test/lib/rules/validate-jsdoc/check-redundant-returns.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
describe('lib/rules/validate-jsdoc/check-redundant-returns', function () {
22
var checker = global.checker({
3-
plugins: ['.']
3+
plugins: ['./lib/index']
44
});
55

66
describe('not configured', function() {

test/lib/rules/validate-jsdoc/check-return-types.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
describe('lib/rules/validate-jsdoc/check-return-types', function () {
22
var checker = global.checker({
3-
plugins: ['.']
3+
plugins: ['./lib/index']
44
});
55

66
describe('not configured', function() {

test/lib/rules/validate-jsdoc/check-types.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
describe('lib/rules/validate-jsdoc/check-types', function() {
22
var checker = global.checker({
3-
plugins: ['.']
3+
plugins: ['./lib/index']
44
});
55

66
describe('not configured', function() {

test/lib/rules/validate-jsdoc/enforce-existence.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
describe('lib/rules/validate-jsdoc/enforce-existence', function () {
22
var checker = global.checker({
3-
plugins: ['.']
3+
plugins: ['./lib/index']
44
});
55

66
describe('not configured', function() {

test/lib/rules/validate-jsdoc/leading-underscore-access.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
describe('lib/rules/validate-jsdoc/leading-underscore-access', function () {
22
var checker = global.checker({
3-
plugins: ['.']
3+
plugins: ['./lib/index']
44
});
55

66
describe('not configured', function() {
@@ -93,7 +93,13 @@ describe('lib/rules/validate-jsdoc/leading-underscore-access', function () {
9393
*/
9494
function _funcName(p) {}
9595
},
96-
errors: [{ line: 6, column: 0, message: 'Method access doesn\'t match', rule: 'jsDoc' }]
96+
errors: [{
97+
line: 6,
98+
column: 0,
99+
message: 'Method access doesn\'t match',
100+
rule: 'jsDoc',
101+
filename: 'input'
102+
}]
97103
}, {
98104
it: 'should skip anonymous',
99105
rules: {leadingUnderscoreAccess: true},

test/lib/rules/validate-jsdoc/require-param-types.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
describe('lib/rules/validate-jsdoc/require-param-types', function () {
22
var checker = global.checker({
3-
plugins: ['.']
3+
plugins: ['./lib/index']
44
});
55

66
describe('not configured', function() {

0 commit comments

Comments
 (0)