- See the JavaScript syntax and the custom snippet syntax for examples.
- Arguments passed to the constructor:
snippetInterface
- string equal to one of the following: 'async-await', 'callback', 'generator', 'promise', or 'synchronous'
- Arguments passed to
build
method:- An object with the following keys:
comment
: a comment to be placed at the top of the functionfunctionName
: the function name to use for the snippetgeneratedExpressions
: from cucumber-expressions. In most cases will be an array of length 1. But there may be multiple. If multiple, please follow the behavior of the javascript syntax in presenting each of them. See the "multiple patterns" test in this file.stepParameterNames
: names for the doc string or data table parameter when applicable. Theses should be appended to the parameter names of each generated expressions.
- An object with the following keys:
- Arguments passed to the constructor:
- Please add the keywords
cucumber
andsnippets
to your package, so it can easily be found by searching npm. - Please open an issue if you would like more information.