Now you can run tests written in gherkin using jest.
$ yarn add --dev gherkin-jest
Then, add to your jest config:
"transform":,"setupFiles": ,"testMatch": ,"moduleFileExtensions": ,
Define your steps in the setup file:
const cucumber = ;cucumbercucumber;cucumber;cucumber;
Write a test:
Feature: using feature files in jestAs a developerI want to write tests in cucumberSo that the business can understand my testsScenario: a simple arithmetic testGiven I have numbers 3 and 4When I add themThen I get 7
This package just wraps the stucumber package to make a Jest transformer. More details on the flavour of Gherkin used and how to set up supporting code can be found in that package's documentation.