本文整理匯總了TypeScript中karma.Server.refreshFiles方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript Server.refreshFiles方法的具體用法?TypeScript Server.refreshFiles怎麽用?TypeScript Server.refreshFiles使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類karma.Server
的用法示例。
在下文中一共展示了Server.refreshFiles方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1:
let runTests = () => {
server.refreshFiles().then(() => server._injector.get('executor').schedule());
};
示例2:
let runTests = (err?: Error) => {
if (!err) {
server.refreshFiles().then(() => server._injector.get('executor').schedule());
}
};
示例3: require
karma.runner.run({port: 9876}, (exitCode: number) => {
console.log('Karma has exited with ' + exitCode);
process.exit(exitCode);
});
var Server = require('karma').Server;
var server = new Server({port: 9876}, function(exitCode: number) {
console.log('Karma has exited with ' + exitCode);
process.exit(exitCode);
});
server.start();
server.refreshFiles();
server.on('browser_register', function (browser: any) {
console.log('A new browser was registered');
});
var runner = require('karma').runner;
runner.run({port: 9876}, function(exitCode: number) {
console.log('Karma has exited with ' + exitCode);
process.exit(exitCode);
});
//
var captured: boolean = karma.launcher.areAllCaptured();