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


TypeScript Server.refreshFiles方法代碼示例

本文整理匯總了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());
 };
開發者ID:dharmeshpipariya,項目名稱:material2,代碼行數:3,代碼來源:unit-test.ts

示例2:

 let runTests = (err?: Error) => {
   if (!err) {
     server.refreshFiles().then(() => server._injector.get('executor').schedule());
   }
 };
開發者ID:attilacsanyi,項目名稱:material2,代碼行數:5,代碼來源:unit-test.ts

示例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();
開發者ID:ErykB2000,項目名稱:DefinitelyTyped,代碼行數:29,代碼來源:karma-tests.ts


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