Skip to content

Commit cd504a2

Browse files
committed
test(require-returns-check): Add valid cases of undefined returns matching tag and defined tag with defined value
1 parent de366f1 commit cd504a2

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed

test/rules/assertions/requireReturnsCheck.js

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,56 @@ export default {
240240
function quux () {
241241
}
242242
`
243+
},
244+
{
245+
code: `
246+
/**
247+
* @returns {void} Foo.
248+
*/
249+
function quux () {
250+
return undefined;
251+
}
252+
`
253+
},
254+
{
255+
code: `
256+
/**
257+
* @returns {void} Foo.
258+
*/
259+
function quux () {
260+
return;
261+
}
262+
`
263+
},
264+
{
265+
code: `
266+
/**
267+
*
268+
*/
269+
function quux () {
270+
return undefined;
271+
}
272+
`
273+
},
274+
{
275+
code: `
276+
/**
277+
*
278+
*/
279+
function quux () {
280+
return;
281+
}
282+
`
283+
},
284+
{
285+
code: `
286+
/**
287+
* @returns {boolean} Foo.
288+
*/
289+
function quux () {
290+
return true;
291+
}
292+
`
243293
}
244294
]
245295
};

0 commit comments

Comments
 (0)