Skip to content

Commit

Permalink
Add test case for extra, unexpected tag
Browse files Browse the repository at this point in the history
  • Loading branch information
seanpoulter committed Feb 21, 2024
1 parent 03db300 commit 55e5fc2
Showing 1 changed file with 40 additions and 5 deletions.
45 changes: 40 additions & 5 deletions test/rules/assertions/checkParamNames.js
Original file line number Diff line number Diff line change
Expand Up @@ -1244,7 +1244,28 @@ export default {
message: 'Expected @param names to be "foo, bar". Got "bar, foo".',
},
],
}
},
{
code: `
/**
* @param foo
* @param bar
*/
function quux (foo) {
}
`,
options: [
{
disableMissingParamChecks: true,
},
],
errors: [
{
line: 4,
message: '@param "bar" does not match an existing function parameter.',
},
],
},
],
valid: [
{
Expand Down Expand Up @@ -1900,17 +1921,31 @@ export default {
{
code: `
/**
* @param foo
* @param foo.bar
* Documentation
*/
function quux (bar, foo) {
function quux (foo, bar) {
}
`,
options: [
{
disableMissingParamChecks: true,
},
],
}
},
{
code: `
/**
* @param bar
* @param bar.baz
*/
function quux (foo, bar) {
}
`,
options: [
{
disableMissingParamChecks: true,
},
],
},
],
};

0 comments on commit 55e5fc2

Please sign in to comment.