Skip to content
JS model for Gherkin feature files
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
docs Added Rule (#5) Sep 10, 2019
tests Added Rule (#5) Sep 10, 2019
.gitignore Feature/typescript (#2) Jun 26, 2019
.travis.yml Fixed release Jul 3, 2019 Added Rule (#5) Sep 10, 2019 Revert "Deploy gherking/gherkin-ast to… Jun 11, 2019
LICENSE Revert "Deploy gherking/gherkin-ast to… Jun 11, 2019 NPM deploy Jun 28, 2019
package.json Added Rule (#5) Sep 10, 2019
tslint.json Fixing release Jul 2, 2019
yarn.lock Bump handlebars from 4.2.0 to 4.5.3 (#6) Jan 19, 2020


Build Status dependency Status devDependency Status

Models for Gherkin feature files


The API provides types to be able to handle different parts of Gherkin feature files.

In TypeScript:

import {Feature, Scenario /*, Background, ... */} from "gherkin-ast";

OR in JavaScript:

const {Feature, Scenario /*, Background, ... */} = require("gherkin-ast");
const feature = new Feature("Feature", "Displaying documents");
feature.elements.push(new Scenario("Scenario", "Opening a document"));
// ...

For detailed documentation see the TypeDocs documentation.

NOTE parse functions only support AST provided by the parser of gherkin@6.

You can’t perform that action at this time.