我在.feature
文件中定义了一个Cucumber场景,在其中测试了我开发的API:
Given Something
When an API call is executed: GET '/v1/my/endpoint'
Then response status is OK
And response body is:
"""
{
"id": "id-1",
"message": "it worked"
}
"""
我希望能够突出显示JSON代码片段的语法。 在文档1 2中未找到任何内容。语言注入注释也不起作用:
# language=javascript
And response body is:
"""
{
"id": "id-1",
"message": "it worked"
}
"""
所以问题是如何使语言注入工作在.feature
文件中?