本文整理汇总了TypeScript中jasmine.loadConfigFile函数的典型用法代码示例。如果您正苦于以下问题:TypeScript loadConfigFile函数的具体用法?TypeScript loadConfigFile怎么用?TypeScript loadConfigFile使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了loadConfigFile函数的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: 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();
示例2: require
'use strict';
var Jasmine = require('jasmine');
var j = new Jasmine();
j.loadConfigFile('spec/support/jasmine.json');
j.configureDefaultReporter({
showColors: true
});
j.execute();
示例3: require
var Jasmine = require('jasmine');
var jas = new Jasmine();
jas.loadConfigFile('./tests/unit/jasmine.json');
jas.execute();
示例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();
示例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()
示例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();