【发布时间】:2016-07-28 13:01:03
【问题描述】:
可以为多个 given-when-then 语句映射一个公共阶跃函数吗?在 Cucumber JS 中,步骤定义的格式为
this.Given(/^I have the following for a particular test$/, function () {
//code for the step
});
在 C# 版本的 BDD (Specflow) 中,可以将多个 gherkin 语句绑定到单个方法。例如
[Given(@"I have the following for a particular test")]
[Given(@"I have also the following for another test")]
public void GivenIHaveTheFollowingForAParticularTest()
{
}
在 CucumberJS 中是否也有任何机制来实现这一点?
【问题讨论】:
标签: protractor bdd gherkin cucumberjs