Cypress-Cucumber-препроцессор для подключения обеих платформ тестирования не работает - PullRequest
1 голос
/ 13 мая 2019

Я хочу соединить Cypress и Cucumber, и я нашел следующий плагин: https://www.npmjs.com/package/cypress-cucumber-preprocessor

Но моя реализация не работает и не может быть найдена.Я также добавил плагин в папку plugins/index.js.

cypess / интеграции / test.feature

Feature: Background Section

   Background:
    Given counter has been reset

   Scenario: Basic example #1
     When counter is incremented
     Then counter equals 1

   Scenario: Basic example #2
     When counter is incremented
     When counter is incremented
     Then counter equals 2

cypess / интеграции / test.js

let counter = 0;

Given("counter has been reset", () => {
  counter = 0;
});

When("counter is incremented", () => {
  counter += 1;
});

Then("counter equals {int}", value => {
  expect(counter).to.equal(value);
});

cypess / plugins / index.js

// Cucumber Plugin
const cucumber = require('cypress-cucumber-preprocessor').default
module.exports = (on, config) => {
  on('file:preprocessor', cucumber())
}

Ошибка

enter image description here

...