Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

check-cucumber

Package Overview
Dependencies
Maintainers
1
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

check-cucumber - npm Package Compare versions

Comparing version 0.1.6 to 0.1.7

10

analyzer.js

@@ -7,2 +7,3 @@ const Gherkin = require('gherkin').default;

let workDir;
const invalidKeys = ['And', 'But'];

@@ -39,2 +40,3 @@ const getLocation = scenario => (scenario.tags.length ? scenario.tags[0].location.line - 1 : scenario.location.line - 1);

const steps = [];
let previousValidStep = '';
const scenarioJson = { name: getTitle(scenario), file: fileName };

@@ -44,3 +46,9 @@ const start = getLocation(scenario);

for (const step of scenario.steps) {
steps.push({ title: step.text, keyword: step.keyword.trim() });
let keyword = step.keyword.trim();
if (invalidKeys.includes(keyword)) {
keyword = previousValidStep;
} else {
previousValidStep = keyword;
}
steps.push({ title: step.text, keyword });
}

@@ -47,0 +55,0 @@ scenarioJson.code = sourceArray.slice(start, end).join('\n');

2

package.json
{
"name": "check-cucumber",
"version": "0.1.6",
"version": "0.1.7",
"main": "index.js",

@@ -5,0 +5,0 @@ "repository": "git@github.com:testomatio/check-cucumber.git",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc