microsoft/vscode-react-native
Publicmirrored from https://github.com/microsoft/vscode-react-nativeAvailable
test/index.ts
25lines · modeblame
77e8babbdigeff10 years ago | 1 | // Copyright (c) Microsoft Corporation. All rights reserved. |
| 2 | // Licensed under the MIT license. See LICENSE file in the project root for details. | |
| 3 | | |
ee16550eGuillaume Jenkins10 years ago | 4 | // This file is used by VS Code's default test runner to configure Mocha before the test run. |
| 5 | | |
| 6 | /* tslint:disable:no-var-keyword no-var-requires */ | |
| 7 | var testRunner = require("vscode/lib/testrunner"); | |
| 8 | /* tslint:enable:no-var-keyword no-var-requires */ | |
| 9 | | |
| 10 | let mochaOptions: any = { | |
| 11 | ui: "tdd", | |
43039950Jimmy Thomson10 years ago | 12 | useColors: true, |
| 13 | invert: true, | |
cdf34447digeff10 years ago | 14 | grep: "debuggerContext", // Do not run tests intended for the debuggerContext |
ee16550eGuillaume Jenkins10 years ago | 15 | }; |
| 16 | | |
| 17 | // Look for the env variable to decide wheter to use the TeamCity reporter or not | |
| 18 | if (process.env.VSCODE_REACT_NATIVE_TEAMCITY_TEST) { | |
| 19 | mochaOptions.reporter = "mocha-teamcity-reporter"; | |
| 20 | } | |
| 21 | | |
| 22 | // Register Mocha options | |
| 23 | testRunner.configure(mochaOptions); | |
| 24 | | |
| 25 | module.exports = testRunner; |