本文整理汇总了TypeScript中jasmine.addReporter函数的典型用法代码示例。如果您正苦于以下问题:TypeScript addReporter函数的具体用法?TypeScript addReporter怎么用?TypeScript addReporter使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了addReporter函数的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的TypeScript代码示例。
示例1: require
config.reporters.forEach((reporter: {name: string, options: any}) => {
const parts = reporter.name.split("#");
const name = parts[0];
const member = parts[1];
const reporterClass = member ? require(name)[member] : require(name);
jasmine.addReporter(new (reporterClass)(reporter.options));
});
开发者ID:svi3c,项目名称:jasmine-ts,代码行数:7,代码来源:index.ts
示例2: function
// 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 );
mockDom( [], function () {
开发者ID:Izhaki,项目名称:gefri,代码行数:31,代码来源:jasmine.ts
示例3: Jasmine
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
}));
jasmineInst.loadConfigFile('jasmine_config.json');
jasmineInst.execute();
开发者ID:PepkorIT,项目名称:beach-day,代码行数:29,代码来源:boot.ts
示例4: require
import { SpecReporter } from "jasmine-spec-reporter";
import { DisplayProcessor } from "jasmine-spec-reporter";
const Jasmine = require("jasmine");
class CustomProcessor extends DisplayProcessor {
public displayJasmineStarted(info: any, log: String): String {
return `TypeScript ${log}`;
}
}
const jrunner = new Jasmine();
jrunner.env.clearReporters();
jrunner.addReporter(new SpecReporter({
customProcessors: [CustomProcessor],
}));
jrunner.loadConfigFile();
jrunner.execute();
开发者ID:deepthi-g06,项目名称:Link_Project_Angular,代码行数:17,代码来源:jasmine-runner.ts
示例5: require
const Jasmine = require('jasmine')
const Reporter = require('jasmine-spec-reporter')
let testRunner = new Jasmine()
testRunner.loadConfigFile('tests/jasmine.json')
testRunner.addReporter(new Reporter({
isVerbose: false,
showColors: true,
includeStackTrace: false
}))
testRunner.execute()
开发者ID:ng-cookbook,项目名称:angular2-redux-complex-ui,代码行数:11,代码来源:run-tests.ts
示例6: 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.addReporter函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论