microsoft/vscode-react-native
Publicmirrored fromhttps://github.com/microsoft/vscode-react-nativeAvailable
src/test/index.ts
22lines · modecode
| 1 | // This file is used by VS Code's default test runner to configure Mocha before the test run. |
| 2 | |
| 3 | /* tslint:disable:no-var-keyword no-var-requires */ |
| 4 | var testRunner = require("vscode/lib/testrunner"); |
| 5 | /* tslint:enable:no-var-keyword no-var-requires */ |
| 6 | |
| 7 | let mochaOptions: any = { |
| 8 | ui: "tdd", |
| 9 | useColors: true, |
| 10 | invert: true, |
| 11 | grep: "debuggerContext" // Do not run tests intended for the debuggerContext |
| 12 | }; |
| 13 | |
| 14 | // Look for the env variable to decide wheter to use the TeamCity reporter or not |
| 15 | if (process.env.VSCODE_REACT_NATIVE_TEAMCITY_TEST) { |
| 16 | mochaOptions.reporter = "mocha-teamcity-reporter"; |
| 17 | } |
| 18 | |
| 19 | // Register Mocha options |
| 20 | testRunner.configure(mochaOptions); |
| 21 | |
| 22 | module.exports = testRunner; |