本文整理汇总了TypeScript中yadda.createInstance函数的典型用法代码示例。如果您正苦于以下问题:TypeScript createInstance函数的具体用法?TypeScript createInstance怎么用?TypeScript createInstance使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了createInstance函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: featureFile
featureFile(file, feature => {
const yadda = Yadda.createInstance(bottlesLibrary);
scenarios(feature.scenarios, scenario => {
steps(scenario.steps, (step, done) => {
yadda.run(step, done);
});
});
});
示例2: featureFile
featureFile(file, (feature) => {
const yadda = Yadda.createInstance(library);
afterEach((done) =>
parentResource.db.connection.db
.dropDatabase((err, result) => done()));
scenarios(feature.scenarios, (scenario, done) =>
yadda.run(scenario.steps, done));
});
示例3: featureFile
featureFile(file, function (feature:any) {
const library = require("./features/step_definitions/my_steps");
let yadda = Yadda.createInstance(library);
scenarios(feature.scenarios, (scenario:any) =>
steps(scenario.steps, (step:any, done:any) =>
yadda.run(step, done)
)
);
});
示例4: featureFile
featureFile(file, function(feature) {
var yadda = Yadda.createInstance(library);
afterEach((done) => {
mongoose.connection.db.dropDatabase(function(err, result) {
done();
});
});
scenarios(feature.scenarios, function(scenario, done) {
yadda.run(scenario.steps, done);
});
});
示例5: next
import * as Yadda from "yadda";
const English = Yadda.localisation.English;
{
const library = new Yadda.Library()
.define("A synchronous step", () => {
// Code goes here
})
.define("An asynchronous step", (next: (err?: Error) => void) => {
// Code goes here
next();
});
Yadda.createInstance(library);
}
{
const library = new Yadda.Library()
.define("[Ss]etup a new user", () => {
// Code goes here
})
.define(/[Ss]etup a new user/, () => {
// Code goes here
});
Yadda.createInstance(library);
}
{