Skip to content

Commit

Permalink
Pass additionalSuiteNames to getSuiteNames
Browse files Browse the repository at this point in the history
  • Loading branch information
lo1tuma committed Jul 31, 2020
1 parent 8cf6562 commit 7ee4a5a
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/util/ast.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,9 @@ function getNodeName(node) {
}

function isDescribe(node, additionalSuiteNames = []) {
const describeAliases = getSuiteNames({ modifiers: [ 'skip', 'only' ] });
const describeAliases = getSuiteNames({ modifiers: [ 'skip', 'only' ], additionalSuiteNames });

return isCallExpression(node) &&
describeAliases.concat(additionalSuiteNames).indexOf(getNodeName(node.callee)) > -1;
return isCallExpression(node) && describeAliases.indexOf(getNodeName(node.callee)) > -1;
}

function isHookIdentifier(node) {
Expand Down

0 comments on commit 7ee4a5a

Please sign in to comment.