Skip to content

Commit a0c1ef5

Browse files
committed
fixed some test cases of toolbar due to addition of TR language had to increase the call times
1 parent 72bfad3 commit a0c1ef5

File tree

2 files changed

+6
-10
lines changed

2 files changed

+6
-10
lines changed

js/__tests__/toolbar.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,14 +95,14 @@ describe("Toolbar Class", () => {
9595
test("sets correct strings for _THIS_IS_MUSIC_BLOCKS_ true", () => {
9696
global._THIS_IS_MUSIC_BLOCKS_ = true;
9797
toolbar.init({});
98-
expect(global._).toHaveBeenCalledTimes(132);
98+
expect(global._).toHaveBeenCalledTimes(134);
9999
expect(global._).toHaveBeenNthCalledWith(1, "About Music Blocks");
100100
});
101101

102102
test("sets correct strings for _THIS_IS_MUSIC_BLOCKS_ false", () => {
103103
global._THIS_IS_MUSIC_BLOCKS_ = false;
104104
toolbar.init({});
105-
expect(global._).toHaveBeenCalledTimes(114);
105+
expect(global._).toHaveBeenCalledTimes(116);
106106
expect(global._).toHaveBeenNthCalledWith(1, "About Turtle Blocks");
107107
});
108108

js/languagebox.js

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -59,17 +59,13 @@ class LanguageBox {
5959
* @returns {void}
6060
*/
6161
ja_onclick() {
62-
this._language = "ja-kanji";
63-
this.activity.storage.kanaPreference = "kanji";
64-
this.hide();
62+
this._language = "ja";
63+
this.activity.storage.kanaPreference = "kanji";
64+
this.hide();
6565
}
6666

67-
/**
68-
* @public
69-
* @returns {void}
70-
*/
7167
kana_onclick() {
72-
this._language = "ja-kana";
68+
this._language = "ja";
7369
this.activity.storage.kanaPreference = "kana";
7470
this.hide();
7571
}

0 commit comments

Comments
 (0)