cucumber / cucumber/vscode

Snippet generation does not respect configuration

Open
#151 3 comments 0 reactions 0 assignees View on GitHub
:zap: enhancement
Dominant language
TypeScript
Stars
88
Forks
33
PR merge metrics
No merged PRs in 30d

Description

### 👓 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"
}
}
}
```
2. Open vscode with the cucumber plugin loaded.
3. Write a feature file with undefined steps.
4. Generate a step from the feature file via the plugin.
5. See the generated step.

### 📚 Any additional context?

----

*This text was originally generated from a [template](https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/about-issue-and-pull-request-templates), then edited by hand. [You can modify the template here.](https://github.com/cucumber/.github/edit/main/.github/ISSUE_TEMPLATE/bug_report.md)*

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.