Skip to content

Latest commit

 

History

History
13 lines (12 loc) · 1.41 KB

custom_snippet_syntaxes.md

File metadata and controls

13 lines (12 loc) · 1.41 KB

Custom snippet syntaxes

  • 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 function
        • functionName: the function name to use for the snippet
        • generatedExpressions: 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.
  • Please add the keywords cucumber and snippets to your package, so it can easily be found by searching npm.
  • Please open an issue if you would like more information.