Skip to content

Commit f4f7bdb

Browse files
author
Alexej Yaroshevich
committed
tests: add fixed field to location tests (ouch.)
1 parent f203c18 commit f4f7bdb

File tree

4 files changed

+30
-24
lines changed

4 files changed

+30
-24
lines changed

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

Lines changed: 23 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,8 @@ describe('lib/rules/validate-jsdoc/check-param-names', function() {
150150
column: 10,
151151
line: 2,
152152
rule: "jsDoc",
153-
filename: "input"
153+
filename: "input",
154+
fixed: undefined
154155
}
155156
]
156157
}, {
@@ -172,14 +173,16 @@ describe('lib/rules/validate-jsdoc/check-param-names', function() {
172173
column: 14,
173174
line: 3,
174175
rule: "jsDoc",
175-
filename: "input"
176+
filename: "input",
177+
fixed: undefined
176178
},
177179
{
178180
message: 'Parameters yyy and xxx are out of order',
179181
column: 14,
180182
line: 4,
181183
rule: "jsDoc",
182-
filename: "input"
184+
filename: "input",
185+
fixed: undefined
183186
}
184187
]
185188
}, {
@@ -195,8 +198,8 @@ describe('lib/rules/validate-jsdoc/check-param-names', function() {
195198
};
196199
},
197200
errors: [
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"}
201+
{message: 'Parameter xxx is out of order', column: 14, line: 3, rule: "jsDoc", filename: "input", fixed: undefined},
202+
{message: 'Expected xxx but got yyy', column: 14, line: 4, rule: "jsDoc", filename: "input", fixed: undefined}
200203
]
201204
}, {
202205
it: 'should report out of order and expected v2',
@@ -211,8 +214,8 @@ describe('lib/rules/validate-jsdoc/check-param-names', function() {
211214
};
212215
},
213216
errors: [
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"}
217+
{message: 'Expected yyy but got xxx', column: 14, line: 3, rule: "jsDoc", filename: "input", fixed: undefined},
218+
{message: 'Parameter yyy is out of order', column: 14, line: 4, rule: "jsDoc", filename: "input", fixed: undefined}
216219
]
217220
}, {
218221
it: 'should not report out of order but expected',
@@ -227,7 +230,7 @@ describe('lib/rules/validate-jsdoc/check-param-names', function() {
227230
};
228231
},
229232
errors: [
230-
{message: 'Expected zzz but got xxx', column: 14, line: 3, rule: "jsDoc", filename: "input"}
233+
{message: 'Expected zzz but got xxx', column: 14, line: 3, rule: "jsDoc", filename: "input", fixed: undefined}
231234
]
232235
}, {
233236
it: 'should not report wrong order',
@@ -307,18 +310,20 @@ describe('lib/rules/validate-jsdoc/check-param-names', function() {
307310
},
308311
errors: [
309312
{
310-
"column": 19,
311-
"filename": "input",
312-
"line": 3,
313-
"message": "Expected `options` but got `definetelyNotOptions`",
314-
"rule": "jsDoc"
313+
column: 19,
314+
filename: 'input',
315+
line: 3,
316+
message: 'Expected `options` but got `definetelyNotOptions`',
317+
rule: 'jsDoc',
318+
fixed: undefined
315319
},
316320
{
317-
"column": 20,
318-
"filename": "input",
319-
"line": 4,
320-
"message": "Expected `options` but got `otherOptions`",
321-
"rule": "jsDoc"
321+
column: 20,
322+
filename: 'input',
323+
line: 4,
324+
message: 'Expected `options` but got `otherOptions`',
325+
rule: 'jsDoc',
326+
fixed: undefined
322327
}
323328
]
324329
}, {

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ describe('lib/rules/validate-jsdoc/check-redundant-access', function () {
104104
function funcName(p) {}
105105
},
106106
errors: [{
107-
line: 4, column: 9, filename: 'input', rule: 'jsDoc',
107+
line: 4, column: 9, filename: 'input', rule: 'jsDoc', fixed: undefined,
108108
message: 'Missing leading underscore for funcName'
109109
}]
110110
}, {
@@ -154,7 +154,7 @@ describe('lib/rules/validate-jsdoc/check-redundant-access', function () {
154154
function funcName(p) {}
155155
},
156156
errors: [{
157-
line: 4, column: 9, filename: 'input', rule: 'jsDoc',
157+
line: 4, column: 9, filename: 'input', rule: 'jsDoc', fixed: undefined,
158158
message: 'Missing trailing underscore for funcName'
159159
}]
160160
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ describe('lib/rules/validate-jsdoc/check-redundant-params', function () {
142142
}
143143
},
144144
errors: [{
145-
column: 3, line: 3, filename: 'input', rule: 'jsDoc',
145+
column: 3, line: 3, filename: 'input', rule: 'jsDoc', fixed: undefined,
146146
message: 'Found redundant param "rest" statement'
147147
}]
148148
}, {

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,8 @@ describe('lib/rules/validate-jsdoc/leading-underscore-access', function () {
9898
column: 9,
9999
message: 'Missing access tag for _funcName',
100100
rule: 'jsDoc',
101-
filename: 'input'
101+
filename: 'input',
102+
fixed: undefined
102103
}]
103104
}, {
104105
it: 'should skip anonymous',
@@ -181,10 +182,10 @@ describe('lib/rules/validate-jsdoc/leading-underscore-access', function () {
181182
var _pubFuncWithUnderscore = function (p) {};
182183
},
183184
errors: [{
184-
column: 3, line: 2, filename: 'input', rule: 'jsDoc',
185+
column: 3, line: 2, filename: 'input', rule: 'jsDoc', fixed: undefined,
185186
message: 'Method access doesn\'t match'
186187
}, {
187-
column: 3, line: 7, filename: 'input', rule: 'jsDoc',
188+
column: 3, line: 7, filename: 'input', rule: 'jsDoc', fixed: undefined,
188189
message: 'Method access doesn\'t match'
189190
}]
190191
}, {

0 commit comments

Comments
 (0)