Skip to content

Commit

Permalink
Fix tests with new plugin support
Browse files Browse the repository at this point in the history
  • Loading branch information
mdevils authored and Alexej Yaroshevich committed Nov 26, 2014
1 parent ae34c69 commit 328235d
Show file tree
Hide file tree
Showing 11 changed files with 44 additions and 20 deletions.
2 changes: 1 addition & 1 deletion test/lib/rules/validate-jsdoc.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ var assert = require('assert');

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

describe('configure', function () {
Expand Down
36 changes: 27 additions & 9 deletions test/lib/rules/validate-jsdoc/check-param-names.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
describe('lib/rules/validate-jsdoc/check-param-names', function() {
var checker = global.checker({
plugins: ['.']
plugins: ['./lib/index']
});

describe('not configured', function() {
Expand Down Expand Up @@ -145,7 +145,13 @@ describe('lib/rules/validate-jsdoc/check-param-names', function() {
}
},
errors: [
{message: 'parameters xxx and yyy are out of order', column: 10, line: 2, rule: "jsDoc"}
{
message: 'parameters xxx and yyy are out of order',
column: 10,
line: 2,
rule: "jsDoc",
filename: "input"
}
]
}, {
it: 'should report out of order many times',
Expand All @@ -161,8 +167,20 @@ describe('lib/rules/validate-jsdoc/check-param-names', function() {
};
},
errors: [
{message: 'parameters xxx and zzz are out of order', column: 14, line: 3, rule: "jsDoc"},
{message: 'parameters yyy and xxx are out of order', column: 14, line: 4, rule: "jsDoc"}
{
message: 'parameters xxx and zzz are out of order',
column: 14,
line: 3,
rule: "jsDoc",
filename: "input"
},
{
message: 'parameters yyy and xxx are out of order',
column: 14,
line: 4,
rule: "jsDoc",
filename: "input"
}
]
}, {
it: 'should report out of order and expected',
Expand All @@ -177,8 +195,8 @@ describe('lib/rules/validate-jsdoc/check-param-names', function() {
};
},
errors: [
{message: 'parameter xxx is out of order', column: 14, line: 3, rule: "jsDoc"},
{message: 'expected xxx but got yyy', column: 14, line: 4, rule: "jsDoc"}
{message: 'parameter xxx is out of order', column: 14, line: 3, rule: "jsDoc", filename: "input"},
{message: 'expected xxx but got yyy', column: 14, line: 4, rule: "jsDoc", filename: "input"}
]
}, {
it: 'should report out of order and expected v2',
Expand All @@ -193,8 +211,8 @@ describe('lib/rules/validate-jsdoc/check-param-names', function() {
};
},
errors: [
{message: 'expected yyy but got xxx', column: 14, line: 3, rule: "jsDoc"},
{message: 'parameter yyy is out of order', column: 14, line: 4, rule: "jsDoc"}
{message: 'expected yyy but got xxx', column: 14, line: 3, rule: "jsDoc", filename: "input"},
{message: 'parameter yyy is out of order', column: 14, line: 4, rule: "jsDoc", filename: "input"}
]
}, {
it: 'should not report out of order but expected',
Expand All @@ -209,7 +227,7 @@ describe('lib/rules/validate-jsdoc/check-param-names', function() {
};
},
errors: [
{message: 'expected zzz but got xxx', column: 14, line: 3, rule: "jsDoc"}
{message: 'expected zzz but got xxx', column: 14, line: 3, rule: "jsDoc", filename: "input"}
]

}, {
Expand Down
2 changes: 1 addition & 1 deletion test/lib/rules/validate-jsdoc/check-redundant-access.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
describe('lib/rules/validate-jsdoc/check-redundant-access', function () {
var checker = global.checker({
plugins: ['.']
plugins: ['./lib/index']
});

describe('not configured', function() {
Expand Down
2 changes: 1 addition & 1 deletion test/lib/rules/validate-jsdoc/check-redundant-params.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
describe('lib/rules/validate-jsdoc/check-redundant-params', function () {
var checker = global.checker({
plugins: ['.']
plugins: ['./lib/index']
});

describe('not configured', function() {
Expand Down
2 changes: 1 addition & 1 deletion test/lib/rules/validate-jsdoc/check-redundant-returns.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
describe('lib/rules/validate-jsdoc/check-redundant-returns', function () {
var checker = global.checker({
plugins: ['.']
plugins: ['./lib/index']
});

describe('not configured', function() {
Expand Down
2 changes: 1 addition & 1 deletion test/lib/rules/validate-jsdoc/check-return-types.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
describe('lib/rules/validate-jsdoc/check-return-types', function () {
var checker = global.checker({
plugins: ['.']
plugins: ['./lib/index']
});

describe('not configured', function() {
Expand Down
2 changes: 1 addition & 1 deletion test/lib/rules/validate-jsdoc/check-types.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
describe('lib/rules/validate-jsdoc/check-types', function() {
var checker = global.checker({
plugins: ['.']
plugins: ['./lib/index']
});

describe('not configured', function() {
Expand Down
2 changes: 1 addition & 1 deletion test/lib/rules/validate-jsdoc/enforce-existence.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
describe('lib/rules/validate-jsdoc/enforce-existence', function () {
var checker = global.checker({
plugins: ['.']
plugins: ['./lib/index']
});

describe('not configured', function() {
Expand Down
10 changes: 8 additions & 2 deletions test/lib/rules/validate-jsdoc/leading-underscore-access.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
describe('lib/rules/validate-jsdoc/leading-underscore-access', function () {
var checker = global.checker({
plugins: ['.']
plugins: ['./lib/index']
});

describe('not configured', function() {
Expand Down Expand Up @@ -93,7 +93,13 @@ describe('lib/rules/validate-jsdoc/leading-underscore-access', function () {
*/
function _funcName(p) {}
},
errors: [{ line: 6, column: 0, message: 'Method access doesn\'t match', rule: 'jsDoc' }]
errors: [{
line: 6,
column: 0,
message: 'Method access doesn\'t match',
rule: 'jsDoc',
filename: 'input'
}]
}, {
it: 'should skip anonymous',
rules: {leadingUnderscoreAccess: true},
Expand Down
2 changes: 1 addition & 1 deletion test/lib/rules/validate-jsdoc/require-param-types.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
describe('lib/rules/validate-jsdoc/require-param-types', function () {
var checker = global.checker({
plugins: ['.']
plugins: ['./lib/index']
});

describe('not configured', function() {
Expand Down
2 changes: 1 addition & 1 deletion test/lib/rules/validate-jsdoc/require-return-types.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
describe('lib/rules/validate-jsdoc/require-return-types', function () {
var checker = global.checker({
plugins: ['.']
plugins: ['./lib/index']
});

describe('not configured', function() {
Expand Down

0 comments on commit 328235d

Please sign in to comment.