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


TypeScript mocha.addFile函數代碼示例

本文整理匯總了TypeScript中mocha.addFile函數的典型用法代碼示例。如果您正苦於以下問題:TypeScript addFile函數的具體用法?TypeScript addFile怎麽用?TypeScript addFile使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了addFile函數的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。

示例1:

}).forEach(function (file) {
    mocha.addFile(
        path.join(testDir, file)
    );
});
開發者ID:ffarzat,項目名稱:Typescript-Tests,代碼行數:5,代碼來源:app.ts

示例2: require

/*---------------------------------------------------------------------------------------------
 *  Copyright (c) Microsoft Corporation. All rights reserved.
 *  Licensed under the MIT License. See License.txt in the project root for license information.
 *--------------------------------------------------------------------------------------------*/

const MochaTest = require('mocha');

const mochaTest = new MochaTest({
	timeout: 60000,
	slow: 10000,
	useColors: true
});
mochaTest.addFile(require('path').join(process.cwd(), 'out/test.js'));
mochaTest.run((failures) => {
	process.exit(failures);
});
開發者ID:kieferrm,項目名稱:vscode,代碼行數:16,代碼來源:mocha-runner.ts

示例3:

 _.forEach(testFiles, (testFile) => mocha.addFile(testFile));
開發者ID:zthomae,項目名稱:xanadu,代碼行數:1,代碼來源:test.ts

示例4:

 files.forEach(function(file) {
   testRunner.addFile(file);
 });
開發者ID:bitjson,項目名稱:bitcore,代碼行數:3,代碼來源:unit.ts

示例5: require

/*---------------------------------------------------------------------------------------------
 *  Copyright (c) Microsoft Corporation. All rights reserved.
 *  Licensed under the MIT License. See License.txt in the project root for license information.
 *--------------------------------------------------------------------------------------------*/

const MochaTest = require('mocha');
const path = require('path');

const mochaTest = new MochaTest({
	timeout: 360000,
	retries: 2,
	slow: 50000,
	useColors: true
});

mochaTest.addFile(path.join(process.cwd(), 'out/test.js'));
mochaTest.run((failures) => {
	process.exit(failures);
});
開發者ID:FabianLauer,項目名稱:vscode,代碼行數:19,代碼來源:mocha-runner.ts

示例6: require

process.env.TS_NODE_PROJECT = './tsconfig.spec.json';
import 'reflect-metadata';

require('ts-mocha');
const Mocha = require('mocha');

const mocha = new Mocha();
mocha.addFile(`./tests-ssr/todo.mocha.ts`);
mocha.addFile(`./tests-ssr/exit.mocha.ts`);
mocha.run((failures: number) => {
  process.on('exit', () => {
    process.exit(failures); // exit with non-zero status if there were failures
  });
});
開發者ID:LucasFrecia,項目名稱:store,代碼行數:14,代碼來源:test.ssr.ts


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