diff --git a/test/rules/assertions/matchDescription.js b/test/rules/assertions/matchDescription.js index e3f45d5ed..d8e09b479 100644 --- a/test/rules/assertions/matchDescription.js +++ b/test/rules/assertions/matchDescription.js @@ -680,6 +680,57 @@ export default { ] } ] + }, + { + code: ` + /** + * @param foo Foo bar + */ + function quux (foo) { + + } + `, + errors: [ + { + line: 3, + message: 'JSDoc description does not satisfy the regex pattern.' + } + ], + options: [{ + tags: { + param: true + } + }], + settings: { + jsdoc: { + tagNamePreference: { + description: false + } + } + } + }, + { + code: ` + /** + * Foo bar + */ + function quux (foo) { + + } + `, + errors: [ + { + line: 3, + message: 'JSDoc description does not satisfy the regex pattern.' + } + ], + settings: { + jsdoc: { + tagNamePreference: { + description: false + } + } + } } ], valid: [ @@ -1130,6 +1181,40 @@ export default { } } ] + }, + { + code: ` + /** + * @param foo Foo bar. + */ + function quux (foo) { + + } + `, + settings: { + jsdoc: { + tagNamePreference: { + description: false + } + } + } + }, + { + code: ` + /** + * + */ + function quux () { + + } + `, + settings: { + jsdoc: { + tagNamePreference: { + description: false + } + } + } } ] };