当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript yadda.createInstance函数代码示例

本文整理汇总了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);
                });
            });
        });
开发者ID:csrakowski,项目名称:DefinitelyTyped,代码行数:9,代码来源:yadda-tests.ts

示例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));
  });
开发者ID:EnoF,项目名称:rest-io,代码行数:10,代码来源:subresource.spec.ts

示例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)
      )
    );
  });
开发者ID:chrisns,项目名称:graph-bpmn,代码行数:11,代码来源:bddSpec.ts

示例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);
    });
  });
开发者ID:EnoF,项目名称:rest-io,代码行数:13,代码来源:foods.spec.ts

示例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);
}

{
开发者ID:csrakowski,项目名称:DefinitelyTyped,代码行数:30,代码来源:yadda-tests.ts


注:本文中的yadda.createInstance函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。