How to use cucumber-tag-expressions - 4 common examples

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;
  }
}
github cucumber / cucumber-js / src / pickle_filter.js View on Github external
constructor(tagExpression) {
    if (tagExpression) {
      this.tagExpressionNode = parse(tagExpression || '')
    }
  }
github cucumber / cucumber / fake-cucumber / javascript / src / support-code / Hook.ts View on Github external
public match(tags: string[]): boolean {
    const expression = parseTagExpression(this.tagExpression)
    return expression.evaluate(tags)
  }
github cucumber / cucumber / fake-cucumber / javascript / src / Hook.ts View on Github external
private matchesTagExpression(pickle: messages.IPickle): boolean {
    const expression = parseTagExpression(this.tagExpression)
    const tagNames = pickle.tags.map(tag => tag.name)
    return expression.evaluate(tagNames)
  }
}

cucumber-tag-expressions

Cucumber Tag Expression parser

MIT
Latest version published 5 years ago

Package Health Score

53 / 100
Full package analysis