cucumber / cucumber-expressions

Human friendly alternative to Regular Expressions
MIT License
152 stars 51 forks source link

Typo in error message for use of alternation inside an optional #252

Closed kieran-ryan closed 10 months ago

kieran-ryan commented 10 months ago

Repeated 'the' within the error message for use of an alternation inside an optional.

πŸ‘“ What did you see?

Through an issue raised on the Visual Studio Code extension (cucumber/vscode#142), it was observed that the error message for use of an alternation inside an optional includes a repeated 'the' in its second line:

An alternation can not be used inside an optional.
You can use '\/' to escape the the '/'

βœ… What did you expect to see?

Single 'the':

An alternation can not be used inside an optional.
You can use '\/' to escape the '/'

πŸ“¦ Which tool/library version are you using?

Cucumber Expressions: 16.1.2 Cucumber Visual Studio Code extension: 1.8.0

πŸ”¬ How could we reproduce it?

  1. Install the Visual Studio Code extension

  2. Create a step definition with an alternation inside an optional

    import { When } from 'cypress-cucumber-preprocessor/steps'
    const { wait } = cy
    
    When('entro no detalhe d(a/o) {string}', () => {
    wait('@apisRequests')
    })
  3. Check the logs of the Cucumber Language Server in the Output window