本文整理汇总了TypeScript中karma.server.start方法的典型用法代码示例。如果您正苦于以下问题:TypeScript server.start方法的具体用法?TypeScript server.start怎么用?TypeScript server.start使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类karma.server
的用法示例。
在下文中一共展示了server.start方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: function
return function (done) {
karma.start({
configFile: join(process.cwd(), 'karma.conf.js'),
singleRun: true,
}, function() {
done();
});
};
示例2: start_mock_server
gulp.task('test-browser', ['tsc'], (done) => {
var server = start_mock_server()
karma.start({
configFile: __dirname + '/karma.conf.ts',
webpack: _.assign(webpackConfig,{
debug: true
})
}, () => {
server.kill('SIGINT')
done()
})
})
示例3: startKarma
function startKarma(conf, next) {
karma.server.start(conf, function (exitCode) {
// exit code === 0 is OK
if (!exitCode) {
console.log('\tTests ran successfully.\n');
// rerun with a different configuration
next();
} else {
// just exit with the error code
next(exitCode);
}
});
}
示例4: startTests
function startTests(singleRun: boolean, done: any) {
'use strict';
var karma = require('karma').server;
var excludeFiles = [];
var serverSpecs = config.serverIntegrationSpecs;
excludeFiles = serverSpecs;
karma.start({
configFile: __dirname + '/karma.conf.js',
exclude: excludeFiles,
singleRun: singleRun
}, karmaCompleted);
function karmaCompleted(karmaResult: any) {
console.log('Karma completed!');
if (karmaResult === 1) {
done('karma: tests failed with code ' + karmaResult);
} else {
done();
}
}
}
示例5: Promise
var promise:any = new Promise(function(resolve:any, reject:any) {
server.start(config, function(){
resolve(this);
});
});