diff --git a/features/step_definition_snippets_interfaces.feature b/features/step_definition_snippets_interfaces.feature index d0579ecff..00e2bf089 100644 --- a/features/step_definition_snippets_interfaces.feature +++ b/features/step_definition_snippets_interfaces.feature @@ -25,7 +25,6 @@ Feature: step definition snippets custom syntax Examples: | INTERFACE | SNIPPET_FUNCTION_KEYWORD_AND_PARAMETERS | SNIPPET_IMPLEMENTATION | | callback | function (callback) | callback(null, 'pending') | - | generator | function *() | return 'pending' | | promise | function () | return Promise.resolve('pending') | | async-await | async function () | return 'pending' | | synchronous | function () | return 'pending' | diff --git a/src/formatter/step_definition_snippet_builder/javascript_snippet_syntax.ts b/src/formatter/step_definition_snippet_builder/javascript_snippet_syntax.ts index 09dd4b949..3100c8684 100644 --- a/src/formatter/step_definition_snippet_builder/javascript_snippet_syntax.ts +++ b/src/formatter/step_definition_snippet_builder/javascript_snippet_syntax.ts @@ -23,8 +23,6 @@ export default class JavaScriptSnippetSyntax implements ISnippetSnytax { let functionKeyword = 'function ' if (this.snippetInterface === SnippetInterface.AsyncAwait) { functionKeyword = 'async ' + functionKeyword - } else if (this.snippetInterface === SnippetInterface.Generator) { - functionKeyword += '*' } let implementation: string diff --git a/src/formatter/step_definition_snippet_builder/javascript_snippet_syntax_spec.ts b/src/formatter/step_definition_snippet_builder/javascript_snippet_syntax_spec.ts index dc6434f31..cba92c094 100644 --- a/src/formatter/step_definition_snippet_builder/javascript_snippet_syntax_spec.ts +++ b/src/formatter/step_definition_snippet_builder/javascript_snippet_syntax_spec.ts @@ -45,31 +45,6 @@ describe('JavascriptSnippetSyntax', () => { }) }) - describe('generator interface', () => { - it('returns the proper snippet', function () { - // Arrange - const syntax = new JavascriptSnippetSyntax(SnippetInterface.Generator) - const buildOptions: ISnippetSyntaxBuildOptions = { - comment: 'comment', - functionName: 'functionName', - generatedExpressions: generateExpressions('"abc" def "ghi"'), - stepParameterNames: [], - } - - // Act - const result = syntax.build(buildOptions) - - // Assert - expect(result).to.eql( - reindent(` - functionName('{string} def {string}', function *(string, string2) { - // comment - return 'pending'; - });`) - ) - }) - }) - describe('promise interface', () => { it('returns the proper snippet', function () { // Arrange diff --git a/src/formatter/step_definition_snippet_builder/snippet_syntax.ts b/src/formatter/step_definition_snippet_builder/snippet_syntax.ts index ca25a8f2c..e617ab4c0 100644 --- a/src/formatter/step_definition_snippet_builder/snippet_syntax.ts +++ b/src/formatter/step_definition_snippet_builder/snippet_syntax.ts @@ -3,7 +3,6 @@ import { GeneratedExpression } from '@cucumber/cucumber-expressions' export enum SnippetInterface { AsyncAwait = 'async-await', Callback = 'callback', - Generator = 'generator', Promise = 'promise', Synchronous = 'synchronous', }