Skip to content

Commit 30d2194

Browse files
l1bbcsgbrettz9
authored andcommitted
Add a negative test case for interface classes in require-returns-check
1 parent 973f425 commit 30d2194

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

test/rules/assertions/requireReturnsCheck.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,23 @@ export default {
8989
message: 'JSDoc @returns declaration present but return expression not available in function.'
9090
}
9191
]
92+
},
93+
{
94+
code: `
95+
class Foo {
96+
/**
97+
* @returns {string}
98+
*/
99+
bar () {
100+
}
101+
}
102+
`,
103+
errors: [
104+
{
105+
line: 3,
106+
message: 'JSDoc @returns declaration present but return expression not available in function.'
107+
}
108+
]
92109
}
93110
],
94111
valid: [

0 commit comments

Comments
 (0)