當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript jasmine.configureDefaultReporter函數代碼示例

本文整理匯總了TypeScript中jasmine.configureDefaultReporter函數的典型用法代碼示例。如果您正苦於以下問題:TypeScript configureDefaultReporter函數的具體用法?TypeScript configureDefaultReporter怎麽用?TypeScript configureDefaultReporter使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了configureDefaultReporter函數的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。

示例1: function

// To support execution within both ES6(.ts) and transpiled ES5(.js) contexts:
// 1) We retrive the extension,
let extention = path.extname( __filename );
// 2) Set the path relative to this script.
let currentRelativePath = path.relative( process.cwd(), __dirname )
let specPath  = path.join( currentRelativePath, "/../../src")

iJasmine.loadConfig({
    "spec_dir":                     specPath,
    "spec_files":                   [ "**/*.spec" + extention ],
    "stopSpecOnExpectationFailure": true,
    "random":                       false,
    "helpers":                      [ "../tests/unit/jasmineCustomMatchers"  + extention ]
});

iJasmine.configureDefaultReporter({});
iJasmine.addReporter( failFast.init() );

iJasmine.onComplete( function( passed ) {
    let exitCode = 1;

    if( passed ) {
        console.log( 'Ola Kala' );
        exitCode = 0;
    }

    iJasmine.exit( exitCode, process.platform, process.version, process.exit, require('exit') );
});

mockWaitForFrame( di );
開發者ID:Izhaki,項目名稱:gefri,代碼行數:30,代碼來源:jasmine.ts

示例2: require

import {BeachDayReporter} from './lib/reporter/BeachDayReporter';

var Jasmine      = require('jasmine');
var SpecReporter = require('jasmine-spec-reporter').SpecReporter;

var jasmineInst                            = new Jasmine();
global['jasmine'].DEFAULT_TIMEOUT_INTERVAL = 5000;

console.log('Setting up new default JASMINE Suite :)');
console.log('----------------------------------------------------');


// Disable default reporter
jasmineInst.configureDefaultReporter({
    print: function () {
    }
});

// Add a basic reporter for the console :)
jasmineInst.addReporter(new SpecReporter({
    displayStacktrace    : 'all',
    displayPendingSummary: false,
    displayPendingSpec   : false
}));

// Add our custom HTML reporter
jasmineInst.addReporter(new BeachDayReporter({
    logToConsole         : true,
    includeAllConsoleLogs: false,
    maxTestTime          : 2000
}));
開發者ID:PepkorIT,項目名稱:beach-day,代碼行數:31,代碼來源:boot.ts

示例3: require

'use strict';

var Jasmine = require('jasmine');
var j = new Jasmine();

j.loadConfigFile('spec/support/jasmine.json');
j.configureDefaultReporter({
    showColors: true
});
j.execute();
開發者ID:jvitor83,項目名稱:typings-packagejson,代碼行數:10,代碼來源:runner.ts

示例4: distAllRequire

              '@angular/core/test/zone/**',
              '@angular/core/test/fake_async_spec.*',
              '@angular/common/test/forms/**',
              '@angular/router/test/route_config/route_config_spec.*',
              '@angular/router/test/integration/bootstrap_spec.*',
              '@angular/integration_test/symbol_inspector/**',
              '@angular/upgrade/**',
              '@angular/examples/**',
              'angular1_router/**',
              'payload_tests/**'
            ]
          });
        })
        .reduce(function(specFiles, paths) { return specFiles.concat(paths); }, []);

jasmine.DEFAULT_TIMEOUT_INTERVAL = 100;

jrunner.configureDefaultReporter({showColors: process.argv.indexOf('--no-color') === -1});

jrunner.onComplete(function(passed) { process.exit(passed ? 0 : 1); });
jrunner.projectBaseDir = path.resolve(__dirname, '../../');
jrunner.specDir = '';
require('./test-cjs-main.js');
require('zone.js/dist/jasmine-patch.js');
distAllRequire('@angular/platform-server/src/parse5_adapter.js').Parse5DomAdapter.makeCurrent();
specFiles.forEach((file) => {
  var r = distAllRequire(file);
  if (r.main) r.main();
});
jrunner.execute();
開發者ID:AmineAfia,項目名稱:angular,代碼行數:30,代碼來源:index.ts

示例5: require

let Jasmine = require("jasmine");
let reporters = require("jasmine-reporters");

let jasmineExec = new Jasmine();

jasmineExec.loadConfigFile("./Tests/jasmine.json");
jasmineExec.configureDefaultReporter({
    showColors: false
});

let xunitReporter = new reporters.NUnitXmlReporter({
    savePath: __dirname,
    consolidateAll: false
});

jasmineExec.addReporter(xunitReporter);

jasmineExec.execute();
開發者ID:geeklearningio,項目名稱:gl-vsts-tasks-semver,代碼行數:18,代碼來源:runJasmine.ts


注:本文中的jasmine.configureDefaultReporter函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。