Skip to content

Commit

Permalink
Rename checkDescription to isNonEmptyDescription
Browse files Browse the repository at this point in the history
  • Loading branch information
lo1tuma committed Dec 13, 2021
1 parent 99fe7b7 commit 4788035
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/rules/no-empty-description.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ module.exports = {
return node.callee && node.callee.name && testNames.includes(node.callee.name);
}

function checkDescription(mochaCallExpression) {
function isNonEmptyDescription(mochaCallExpression) {
const description = mochaCallExpression.arguments[0];
const text = getStringIfConstant(description, context.getScope());

Expand All @@ -81,7 +81,7 @@ module.exports = {
return {
CallExpression(node) {
if (isTest(node)) {
if (!checkDescription(node)) {
if (!isNonEmptyDescription(node)) {
context.report({
node,
message: message || ERROR_MESSAGE
Expand Down

0 comments on commit 4788035

Please sign in to comment.