當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。