microsoft/vscode-react-native
Publicmirrored from https://github.com/microsoft/vscode-react-nativeAvailable
test/localization/runTest.ts
33lines · modecode
| 1 | // Copyright (c) Microsoft Corporation. All rights reserved. |
| 2 | // Licensed under the MIT license. See LICENSE file in the project root for details. |
| 3 | |
| 4 | import * as path from "path"; |
| 5 | |
| 6 | import { runTests } from "@vscode/test-electron"; |
| 7 | |
| 8 | async function launchTests() { |
| 9 | try { |
| 10 | // The folder containing the Extension Manifest package.json |
| 11 | // Passed to `--extensionDevelopmentPath` |
| 12 | const extensionDevelopmentPath = path.resolve(__dirname, "..", ".."); |
| 13 | |
| 14 | // The path to the extension test runner script |
| 15 | // Passed to --extensionTestsPath |
| 16 | const extensionTestsPath = path.resolve(__dirname, "index"); |
| 17 | console.log(extensionTestsPath); |
| 18 | // Download VS Code, unzip it and run the integration test |
| 19 | await runTests({ |
| 20 | extensionDevelopmentPath, |
| 21 | extensionTestsPath, |
| 22 | launchArgs: ["--locale", "zh-cn"], |
| 23 | version: "stable", |
| 24 | }); |
| 25 | } catch (err) { |
| 26 | console.error(err); |
| 27 | console.error("Failed to run tests"); |
| 28 | process.exit(1); |
| 29 | } |
| 30 | process.exit(); |
| 31 | } |
| 32 | |
| 33 | launchTests(); |
| 34 | |