Skip to content

Commit b5a9168

Browse files
mvarchdevbrettz9
authored andcommitted
test(requireParam): add test case for missing JSDoc @param declaration, #1530
1 parent 24a8b51 commit b5a9168

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

test/rules/assertions/requireParam.js

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2668,6 +2668,35 @@ export default /** @type {import('../index.js').TestCases} */ ({
26682668
}
26692669
`,
26702670
},
2671+
{
2672+
code: `
2673+
/**
2674+
* @param foo
2675+
* @param baz
2676+
* @returns {number}
2677+
*/
2678+
function quux (foo, bar, baz) {
2679+
return foo + bar + baz;
2680+
}
2681+
`,
2682+
errors: [
2683+
{
2684+
line: 2,
2685+
message: 'Missing JSDoc @param "bar" declaration.',
2686+
},
2687+
],
2688+
output: `
2689+
/**
2690+
* @param foo
2691+
* @param bar
2692+
* @param baz
2693+
* @returns {number}
2694+
*/
2695+
function quux (foo, bar, baz) {
2696+
return foo + bar + baz;
2697+
}
2698+
`,
2699+
},
26712700
],
26722701
valid: [
26732702
{

0 commit comments

Comments
 (0)