microsoft/vscode-react-native

Public

mirrored from https://github.com/microsoft/vscode-react-nativeAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
b2b5d016a126b337e01405c6006a069da028e0bf

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

test/localization/localization.test.ts

23lines · 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
4import * as assert from "assert";
5import { ErrorHelper } from "../../src/common/error/errorHelper";
6import { InternalErrorCode } from "../../src/common/error/internalErrorCode";
7
8suite("localizationTest", function() {
9 suite("localizationContext", function () {
10 const commandFailedErrorRu = ErrorHelper.getInternalError(InternalErrorCode.CommandFailed, "Команда");
11 const iosDeployErrorRu = ErrorHelper.getInternalError(InternalErrorCode.IOSDeployNotFound);
12 test("localize should show correct message on Russian for CommandFailed error", (done: MochaDone) => {
13 assert.strictEqual(commandFailedErrorRu.message, "Ошибка при выполнении команды \"Команда\" (error code 101)");
14 done();
15 });
16
17 test("localize should show correct message on Russian for iOSDeployNotFound error", (done: MochaDone) => {
18 assert.strictEqual(iosDeployErrorRu.message,
19 "Не удается найти ios-deploy. Установите его на глобальном уровне (\"npm install -g ios-deploy\") (error code 201)");
20 done();
21 });
22 });
23});
24