Skip to content

Commit

Permalink
modify suite retval warning to be more useful
Browse files Browse the repository at this point in the history
  • Loading branch information
boneskull committed Jan 24, 2019
1 parent 0f95a7d commit c198329
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions lib/interfaces/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,10 +141,11 @@ module.exports = function(suites, context, mocha) {
var result = opts.fn.call(suite);
if (typeof result !== 'undefined') {
utils.deprecate(
'Deprecation Warning: Suites do not support a return value;' +
opts.title +
' returned :' +
result
'Suites ignore return values. Suite "' +
opts.fullTitle() +
'" in ' +
opts.file +
' returned a value; this may be a bug in your test code'
);
}
suites.shift();
Expand Down

0 comments on commit c198329

Please sign in to comment.