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

README.md

gherkin-ast

Build Status dependency Status devDependency Status

Models for Gherkin feature files

AST

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.