Skip to content

Commit

Permalink
checkRedundantReturns: add test for issue #34
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexej Yaroshevich committed Nov 9, 2014
1 parent e794e86 commit 5c963e0
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion test/lib/rules/validate-jsdoc/check-redundant-returns.js
Expand Up @@ -3,7 +3,7 @@ describe('rules/validate-jsdoc', function () {
additionalRules: ['lib/rules/validate-jsdoc.js']
});

describe('check-redudant-returns', function() {
describe('check-redundant-returns', function() {

checker.rules({checkRedundantReturns: true});
checker.cases([
Expand Down Expand Up @@ -44,6 +44,19 @@ describe('rules/validate-jsdoc', function () {
if (true) { return x; }
}
}
}, {
it: 'should not report expression return for inner call result',
code: function () {
/**
* @function
* @return {Promise} a promise
*/
function onEvent () {
return this.login().then(function () {
// do some else
});
}
}
}
/* jshint ignore:end */
]);
Expand Down

0 comments on commit 5c963e0

Please sign in to comment.