How to use the cucumber-tag-expressions.TagExpressionParser function in cucumber-tag-expressions

To help you get started, we’ve selected a few cucumber-tag-expressions examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github TheBrainFamily / cypress-cucumber-preprocessor / lib / tagsHelper.js View on Github external
function shouldProceedCurrentStep(tags = [], envTags = getEnvTags()) {
  const parser = new TagExpressionParser();
  try {
    const expressionNode = parser.parse(envTags);
    const mappedTags = tags.map(tag => tag.name);
    return expressionNode.evaluate(mappedTags);
  } catch (e) {
    /* eslint-disable-next-line no-console */
    console.log(`Error parsing tags: '${envTags}'. Message: ${e.message}`);
    return false;
  }
}

cucumber-tag-expressions

Cucumber Tag Expression parser

MIT
Latest version published 5 years ago

Package Health Score

53 / 100
Full package analysis