Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Snippet generation does not respect configuration #151

Open
Nautigsam opened this issue Apr 1, 2023 · 3 comments
Open

Snippet generation does not respect configuration #151

Nautigsam opened this issue Apr 1, 2023 · 3 comments
Labels
⚡ enhancement Request for new functionality

Comments

@Nautigsam
Copy link

👓 What did you see?

I have a cucumber.json file with the snippetInterface setting set to async-await. When I run cucumber the snippets outputed for undefined steps show the use of async function.

When I generate a step from the feature file via the plugin, the step generated uses a synchronous arrow function.

✅ What did you expect to see?

The generated step should use an async function with the function keyword, just as cucumber does in its output.

📦 Which tool/library version are you using?

cucumber-js v8.10.0

🔬 How could we reproduce it?

  1. Create a cucumber.json file with this content:
{
  "default": {
    "formatOptions": {
      "snippetInterface": "async-await"
    }
  }
}
  1. Open vscode with the cucumber plugin loaded.
  2. Write a feature file with undefined steps.
  3. Generate a step from the feature file via the plugin.
  4. See the generated step.

📚 Any additional context?


This text was originally generated from a template, then edited by hand. You can modify the template here.

@kieran-ryan
Copy link
Member

Thanks! Linking the associated Cucumber JS configuration documentation. This will require a change to the Cucumber Language Service to support snippet configuration - see the JavaScript snippet implementation in the language service.

@kieran-ryan kieran-ryan added the ⚡ enhancement Request for new functionality label Dec 30, 2023
@despellhtb
Copy link

Any news regarding that ?

@kieran-ryan
Copy link
Member

kieran-ryan commented Apr 1, 2024

@despellhtb, issue is reflective of status. Accommodation has been made in the Cucumber Language Server to configure custom snippet templates, though this setting is not yet fully integrated nor available from the extension; and of course would duplicate the aforementioned configuration - though might be a satisfactory mitigation if implemented.

Hope to see this implemented.

Any PRs or suggested code changes would be of great assistance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⚡ enhancement Request for new functionality
Projects
None yet
Development

No branches or pull requests

3 participants