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


TypeScript testrunner.configure函數代碼示例

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


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

示例1: require

//
// PLEASE DO NOT MODIFY / DELETE UNLESS YOU KNOW WHAT YOU ARE DOING
//
// This file is providing the test runner to use when running extension tests.
// By default the test runner in use is Mocha based.
//
// You can provide your own test runner if you want to override it by exporting
// a function run(testRoot: string, clb: (error:Error) => void) that the extension
// host can call to run the tests. The test runner is expected to use console.log
// to report the results back to the caller. When the tests are finished, return
// a possible error to the callback or null if none.

let testRunner = require('vscode/lib/testrunner');

// You can directly control Mocha options by uncommenting the following lines
// See https://github.com/mochajs/mocha/wiki/Using-mocha-programmatically#set-options for more info
testRunner.configure({
    ui: 'tdd', 		// the TDD UI is being used in extension.test.ts (suite, test, etc.)
    useColors: true, // colored output from test results
    timeout: 10000
});

module.exports = testRunner;
開發者ID:SongJLG,項目名稱:pythonVSCode,代碼行數:23,代碼來源:index.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.
 *--------------------------------------------------------------------------------------------*/

//
// PLEASE DO NOT MODIFY / DELETE UNLESS YOU KNOW WHAT YOU ARE DOING
//
// This file is providing the test runner to use when running extension tests.
// By default the test runner in use is Mocha based.
//
// You can provide your own test runner if you want to override it by exporting
// a function run(testRoot: string, clb: (error:Error) => void) that the extension
// host can call to run the tests. The test runner is expected to use console.log
// to report the results back to the caller. When the tests are finished, return
// a possible error to the callback or null if none.

const testRunner = require('vscode/lib/testrunner');

// You can directly control Mocha options by uncommenting the following lines
// See https://github.com/mochajs/mocha/wiki/Using-mocha-programmatically#set-options for more info
testRunner.configure({
	ui: 'tdd', 		// the TDD UI is being used in extension.test.ts (suite, test, etc.)
	useColors: process.platform !== 'win32', // colored output from test results (only windows cannot handle)
	timeout: 10000
});

export = testRunner;
開發者ID:FabianLauer,項目名稱:vscode,代碼行數:28,代碼來源:index.ts

示例3: require

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

const path = require('path');
const testRunner = require('vscode/lib/testrunner');

const suite = 'Integration Workspace Tests';

const options: any = {
	ui: 'tdd',
	useColors: true,
	timeout: 60000
};

if (process.env.BUILD_ARTIFACTSTAGINGDIRECTORY) {
	options.reporter = 'mocha-multi-reporters';
	options.reporterOptions = {
		reporterEnabled: 'spec, mocha-junit-reporter',
		mochaJunitReporterReporterOptions: {
			testsuitesTitle: `${suite} ${process.platform}`,
			mochaFile: path.join(process.env.BUILD_ARTIFACTSTAGINGDIRECTORY, `test-results/${process.platform}-${suite.toLowerCase().replace(/[^\w]/g, '-')}-results.xml`)
		}
	};
}

testRunner.configure(options);

export = testRunner;
開發者ID:DonJayamanne,項目名稱:vscode,代碼行數:30,代碼來源:index.ts

示例4: require

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for details.

// This file is used by VS Code's default test runner to configure Mocha before the test run.

/* tslint:disable:no-var-keyword no-var-requires */
var testRunner = require("vscode/lib/testrunner");
/* tslint:enable:no-var-keyword no-var-requires */

let mochaOptions: any = {
    ui: "tdd",
    useColors: true,
    invert: true,
    grep: "debuggerContext", // Do not run tests intended for the debuggerContext
};

// Look for the env variable to decide wheter to use the TeamCity reporter or not
if (process.env.VSCODE_REACT_NATIVE_TEAMCITY_TEST) {
    mochaOptions.reporter = "mocha-teamcity-reporter";
}

// Register Mocha options
testRunner.configure(mochaOptions);

module.exports = testRunner;
開發者ID:CarlosVV,項目名稱:vscode-react-native,代碼行數:25,代碼來源:index.ts

示例5: require

'use strict';

const testRunner = require('vscode/lib/testrunner');

testRunner.configure({
	ui: 'tdd',
	useColors: true
});

module.exports = testRunner;
開發者ID:SamVerschueren,項目名稱:editorconfig-vscode,代碼行數:10,代碼來源:index.ts

示例6: require

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

//
// PLEASE DO NOT MODIFY / DELETE UNLESS YOU KNOW WHAT YOU ARE DOING
//
// This file is providing the test runner to use when running extension tests.
// By default the test runner in use is Mocha based.
//
// You can provide your own test runner if you want to override it by exporting
// a function run(testRoot: string, clb: (error:Error) => void) that the extension
// host can call to run the tests. The test runner is expected to use console.log
// to report the results back to the caller. When the tests are finished, return
// a possible error to the callback or null if none.

/* tslint:disable:no-var-keyword */
var testRunner = require("vscode/lib/testrunner");
/* tslint:enable:no-var-keyword */

// You can directly control Mocha options by uncommenting the following lines
// See https://github.com/mochajs/mocha/wiki/Using-mocha-programmatically#set-options for more info
testRunner.configure({
    ui: "bdd",   // Switched to bdd; use tdd for the TDD UI is being used in extension.test.ts (suite, test, etc.)
    useColors: true // colored output from test results
});

module.exports = testRunner;
開發者ID:Microsoft,項目名稱:vsts-vscode,代碼行數:30,代碼來源:index.ts

示例7: require

//
// PLEASE DO NOT MODIFY / DELETE UNLESS YOU KNOW WHAT YOU ARE DOING
//
// This file is providing the test runner to use when running extension tests.
// By default the test runner in use is Mocha based.
//
// You can provide your own test runner if you want to override it by exporting
// a function run(testRoot: string, clb: (error:Error) => void) that the extension
// host can call to run the tests. The test runner is expected to use console.log
// to report the results back to the caller. When the tests are finished, return
// a possible error to the callback or null if none.

const testRunner = require('vscode/lib/testrunner'); // tslint:disable-line

// You can directly control Mocha options by uncommenting the following lines
// See https://github.com/mochajs/mocha/wiki/Using-mocha-programmatically#set-options for more info
testRunner.configure({
    reporter: 'list',
    ui: 'bdd',
    useColors: true
});

module.exports = testRunner;
開發者ID:sleistner,項目名稱:vscode-fileutils,代碼行數:23,代碼來源:index.ts

示例8:

//
// PLEASE DO NOT MODIFY / DELETE UNLESS YOU KNOW WHAT YOU ARE DOING
//
// This file is providing the test runner to use when running extension tests.
// By default the test runner in use is Mocha based.
//
// You can provide your own test runner if you want to override it by exporting
// a function run(testRoot: string, clb: (error:Error) => void) that the extension
// host can call to run the tests. The test runner is expected to use console.log
// to report the results back to the caller. When the tests are finished, return
// a possible error to the callback or null if none.

import * as testRunner from 'vscode/lib/testrunner';

// You can directly control Mocha options by uncommenting the following lines
// See https://github.com/mochajs/mocha/wiki/Using-mocha-programmatically#set-options for more info
testRunner.configure({
    ui: 'bdd', 		// the BDD UI is being used in extension.test.ts
    useColors: true // colored output from test results
});

module.exports = testRunner;
開發者ID:bengreenier,項目名稱:vscode-node-readme,代碼行數:22,代碼來源:index.ts

示例9: require

//
// PLEASE DO NOT MODIFY / DELETE UNLESS YOU KNOW WHAT YOU ARE DOING
//
// This file is providing the test runner to use when running extension tests.
// By default the test runner in use is Mocha based.
//
// You can provide your own test runner if you want to override it by exporting
// a function run(testRoot: string, clb: (error:Error) => void) that the extension
// host can call to run the tests. The test runner is expected to use console.log
// to report the results back to the caller. When the tests are finished, return
// a possible error to the callback or null if none.

import { Globals } from '../src/globals';

var testRunner = require('vscode/lib/testrunner');

Globals.isTesting = true;

// You can directly control Mocha options by uncommenting the following lines
// See https://github.com/mochajs/mocha/wiki/Using-mocha-programmatically#set-options for more info
testRunner.configure({
  ui: 'tdd',
  useColors: true,
  timeout: 2500,
});

module.exports = testRunner;


開發者ID:sectioneight,項目名稱:Vim,代碼行數:27,代碼來源:index.ts

示例10: require

// PLEASE DO NOT MODIFY / DELETE UNLESS YOU KNOW WHAT YOU ARE DOING  
//
// This file is providing the test runner to use when running extension tests.
// By default the test runner in use is Mocha based.
// 
// You can provide your own test runner if you want to override it by exporting
// a function run(testRoot: string, clb: (error:Error) => void) that the extension
// host can call to run the tests. The test runner is expected to use console.log
// to report the results back to the caller. When the tests are finished, return
// a possible error to the callback or null if none.

var testRunner = require('vscode/lib/testrunner');

// You can directly control Mocha options by uncommenting the following lines
// See https://github.com/mochajs/mocha/wiki/Using-mocha-programmatically#set-options for more info
testRunner.configure({
    ui: 'tdd', 		// the TDD UI is being used in *.test.ts (suite, test, etc.)
    useColors: true, // colored output from test results
    fullTrace: true,
    timeout: 60000
});

const logFolder = path.join( __dirname, ".logs")

if (!fs.existsSync(logFolder)) {
    fs.mkdirSync(logFolder);
}
const logFilePath = path.join(logFolder, "integrationTests.log");
subscribeToAllLoggers(message => fs.appendFileSync(logFilePath, message));

module.exports = testRunner;
開發者ID:Microsoft,項目名稱:vscppsamples,代碼行數:31,代碼來源:index.ts


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