dotnetprofessional / LiveDoc

A Living Documentation platform for BDD (Gherkin) specifications.
MIT License
9 stars 2 forks source link

Add docStringAsEntity #12

Closed dotnetprofessional closed 7 years ago

dotnetprofessional commented 7 years ago

When using docStrings and you want to supply a JSON object its necessary to write the following code:

let entity = JSON.parse(stepContext.docString)

While not a lot of code, it can be a common scenario and so seems too verbose. Having this as direct support will make the code simpler and easier to read:

let entity = stepContext.docStringAsEntity

The use of the term entity is in line with the table property tableAsEntity.

dotnetprofessional commented 7 years ago

Added in v0.2.2