Skip to content

Commit

Permalink
Add some tests
Browse files Browse the repository at this point in the history
  • Loading branch information
wtetsu committed Aug 14, 2020
1 parent 31ecb95 commit bb8243a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions __test__/resource.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
import * as res from "../src/options/logic/resource";

test("", () => {
expect(res.decideInitialLanguage([])).toEqual("en");
expect(res.decideInitialLanguage(["en", "ja"])).toEqual("en");
expect(res.decideInitialLanguage(["ja", "en"])).toEqual("ja");
expect(res.decideInitialLanguage(["fr", "ja", "en"])).toEqual("ja");
expect(res.decideInitialLanguage(["en-US", "ja"])).toEqual("en");
expect(res.decideInitialLanguage(["en-UK", "ja"])).toEqual("en");
expect(res.decideInitialLanguage(["ja-JP", "en"])).toEqual("ja");

res.setLang("ja");
expect(res.get("selectDictFile")).toEqual("辞書ファイルを選択してください。");
expect(res.get("finishRegister", { count: 999 })).toEqual("登録完了(999語)");
Expand Down

0 comments on commit bb8243a

Please sign in to comment.