poi-plugin-quest-info-2 0.12.8 → 0.12.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -0
- package/build/kcQuestsData/DATA_VERSION +1 -1
- package/build/kcQuestsData/index.ts +1 -1
- package/build/kcQuestsData/quests-scn-new.json +5 -6
- package/build/kcQuestsData/quests-scn.json +44 -51
- package/build/kcanotifyGamedata/DATA_VERSION +1 -1
- package/build/kcanotifyGamedata/index.ts +1 -1
- package/build/kcanotifyGamedata/quests-en.json +1 -161
- package/build/kcanotifyGamedata/quests-jp.json +1 -168
- package/build/kcanotifyGamedata/quests-ko.json +1 -168
- package/build/kcanotifyGamedata/quests-scn.json +3 -170
- package/build/kcanotifyGamedata/quests-tcn.json +3 -170
- package/build/prePostQuest.json +39 -39
- package/build/questCategory.json +11 -18
- package/build/questCodeMap.json +4 -5
- package/package.json +1 -1
- package/src/__tests__/__snapshots__/questCategory.spec.ts.snap +0 -637
- package/src/__tests__/__snapshots__/questHelper.spec.ts.snap +0 -498
- package/src/__tests__/fixtures/firstLoginWithOneComplete.json +0 -72
- package/src/__tests__/fixtures/questList.json +0 -338
- package/src/__tests__/kcanotifyData.spec.ts +0 -30
- package/src/__tests__/kcwikiData.spec.ts +0 -38
- package/src/__tests__/questCategory.spec.ts +0 -37
- package/src/__tests__/questHelper.spec.ts +0 -47
|
@@ -1,338 +0,0 @@
|
|
|
1
|
-
[
|
|
2
|
-
{
|
|
3
|
-
"api_no": 106,
|
|
4
|
-
"api_category": 1,
|
|
5
|
-
"api_type": 4,
|
|
6
|
-
"api_label_type": 1,
|
|
7
|
-
"api_state": 2,
|
|
8
|
-
"api_title": "「重巡戦隊」を編成せよ!",
|
|
9
|
-
"api_detail": "重巡洋艦2隻を擁する重巡艦隊を編成せよ!",
|
|
10
|
-
"api_voice_id": 0,
|
|
11
|
-
"api_get_material": [0, 70, 0, 30],
|
|
12
|
-
"api_bonus_flag": 1,
|
|
13
|
-
"api_progress_flag": 0,
|
|
14
|
-
"api_invalid_flag": 0
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
"api_no": 108,
|
|
18
|
-
"api_category": 1,
|
|
19
|
-
"api_type": 4,
|
|
20
|
-
"api_label_type": 1,
|
|
21
|
-
"api_state": 1,
|
|
22
|
-
"api_title": "「天龍」型軽巡姉妹の全2艦を編成せよ!",
|
|
23
|
-
"api_detail": "天龍型軽巡洋艦「天龍」「龍田」を同一艦隊に配属せよ!",
|
|
24
|
-
"api_voice_id": 0,
|
|
25
|
-
"api_get_material": [100, 100, 100, 50],
|
|
26
|
-
"api_bonus_flag": 1,
|
|
27
|
-
"api_progress_flag": 0,
|
|
28
|
-
"api_invalid_flag": 0
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
"api_no": 116,
|
|
32
|
-
"api_category": 1,
|
|
33
|
-
"api_type": 4,
|
|
34
|
-
"api_label_type": 1,
|
|
35
|
-
"api_state": 1,
|
|
36
|
-
"api_title": "「水上機母艦」を配備せよ!",
|
|
37
|
-
"api_detail": "多数の水上偵察機を運用する「水上機母艦」を艦隊に配備せよ!",
|
|
38
|
-
"api_voice_id": 0,
|
|
39
|
-
"api_get_material": [0, 0, 0, 200],
|
|
40
|
-
"api_bonus_flag": 1,
|
|
41
|
-
"api_progress_flag": 0,
|
|
42
|
-
"api_invalid_flag": 0
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
"api_no": 117,
|
|
46
|
-
"api_category": 1,
|
|
47
|
-
"api_type": 4,
|
|
48
|
-
"api_label_type": 1,
|
|
49
|
-
"api_state": 1,
|
|
50
|
-
"api_title": "第2艦隊で空母機動部隊を編成せよ!",
|
|
51
|
-
"api_detail": "第2艦隊に空母を配備して、空母機動部隊を編成せよ!",
|
|
52
|
-
"api_voice_id": 0,
|
|
53
|
-
"api_get_material": [100, 0, 0, 100],
|
|
54
|
-
"api_bonus_flag": 1,
|
|
55
|
-
"api_progress_flag": 0,
|
|
56
|
-
"api_invalid_flag": 0
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
"api_no": 201,
|
|
60
|
-
"api_category": 2,
|
|
61
|
-
"api_type": 1,
|
|
62
|
-
"api_label_type": 2,
|
|
63
|
-
"api_state": 1,
|
|
64
|
-
"api_title": "敵艦隊を撃破せよ!",
|
|
65
|
-
"api_detail": "艦隊を出撃させ、敵艦隊を捕捉、これを撃滅せよ!",
|
|
66
|
-
"api_voice_id": 0,
|
|
67
|
-
"api_get_material": [50, 50, 0, 0],
|
|
68
|
-
"api_bonus_flag": 1,
|
|
69
|
-
"api_progress_flag": 0,
|
|
70
|
-
"api_invalid_flag": 0
|
|
71
|
-
},
|
|
72
|
-
{
|
|
73
|
-
"api_no": 205,
|
|
74
|
-
"api_category": 2,
|
|
75
|
-
"api_type": 4,
|
|
76
|
-
"api_label_type": 1,
|
|
77
|
-
"api_state": 1,
|
|
78
|
-
"api_title": "接近する「敵前衛艦隊」を迎撃せよ!",
|
|
79
|
-
"api_detail": "南西諸島沖に接近する「敵前衛艦隊」を捕捉、これを撃滅せよ!",
|
|
80
|
-
"api_voice_id": 0,
|
|
81
|
-
"api_get_material": [50, 0, 50, 0],
|
|
82
|
-
"api_bonus_flag": 1,
|
|
83
|
-
"api_progress_flag": 0,
|
|
84
|
-
"api_invalid_flag": 0
|
|
85
|
-
},
|
|
86
|
-
{
|
|
87
|
-
"api_no": 254,
|
|
88
|
-
"api_category": 2,
|
|
89
|
-
"api_type": 4,
|
|
90
|
-
"api_label_type": 1,
|
|
91
|
-
"api_state": 1,
|
|
92
|
-
"api_title": "「軽空母」戦隊、出撃せよ!",
|
|
93
|
-
"api_detail": "軽空母1~2隻、軽巡1隻、駆逐艦3~4隻の艦隊で南西諸島近海の敵を撃滅せよ!",
|
|
94
|
-
"api_voice_id": 0,
|
|
95
|
-
"api_get_material": [0, 300, 0, 300],
|
|
96
|
-
"api_bonus_flag": 1,
|
|
97
|
-
"api_progress_flag": 0,
|
|
98
|
-
"api_invalid_flag": 0
|
|
99
|
-
},
|
|
100
|
-
{
|
|
101
|
-
"api_no": 303,
|
|
102
|
-
"api_category": 3,
|
|
103
|
-
"api_type": 1,
|
|
104
|
-
"api_label_type": 2,
|
|
105
|
-
"api_state": 1,
|
|
106
|
-
"api_title": "「演習」で練度向上!",
|
|
107
|
-
"api_detail": "本日中に他の司令官の艦隊に対して3回「演習」を挑もう!",
|
|
108
|
-
"api_voice_id": 0,
|
|
109
|
-
"api_get_material": [50, 0, 50, 0],
|
|
110
|
-
"api_bonus_flag": 1,
|
|
111
|
-
"api_progress_flag": 0,
|
|
112
|
-
"api_invalid_flag": 0
|
|
113
|
-
},
|
|
114
|
-
{
|
|
115
|
-
"api_no": 320,
|
|
116
|
-
"api_category": 3,
|
|
117
|
-
"api_type": 4,
|
|
118
|
-
"api_label_type": 1,
|
|
119
|
-
"api_state": 1,
|
|
120
|
-
"api_title": "駆逐隊、特訓始め!",
|
|
121
|
-
"api_detail": "駆逐隊演習任務:駆逐艦4隻で編成される駆逐隊。この駆逐隊を含む艦隊を編成。<br>特訓を開始する!同艦隊で本日中に演習にて4回以上勝利せよ!",
|
|
122
|
-
"api_voice_id": 0,
|
|
123
|
-
"api_get_material": [100, 100, 0, 0],
|
|
124
|
-
"api_bonus_flag": 1,
|
|
125
|
-
"api_progress_flag": 0,
|
|
126
|
-
"api_invalid_flag": 0
|
|
127
|
-
},
|
|
128
|
-
{
|
|
129
|
-
"api_no": 348,
|
|
130
|
-
"api_category": 3,
|
|
131
|
-
"api_type": 5,
|
|
132
|
-
"api_label_type": 102,
|
|
133
|
-
"api_state": 1,
|
|
134
|
-
"api_title": "「精鋭軽巡」演習!",
|
|
135
|
-
"api_detail": "旗艦に軽巡級(雷巡を除く)、旗艦含む3隻以上の軽巡級と随伴駆逐艦2隻を配備した軽巡演習艦隊を<br>編成、同艦隊により本日中に演習で【A判定】以上の勝利を4回以上達成せよ!",
|
|
136
|
-
"api_voice_id": 0,
|
|
137
|
-
"api_get_material": [200, 0, 200, 200],
|
|
138
|
-
"api_bonus_flag": 1,
|
|
139
|
-
"api_progress_flag": 0,
|
|
140
|
-
"api_invalid_flag": 0
|
|
141
|
-
},
|
|
142
|
-
{
|
|
143
|
-
"api_no": 401,
|
|
144
|
-
"api_category": 4,
|
|
145
|
-
"api_type": 4,
|
|
146
|
-
"api_label_type": 1,
|
|
147
|
-
"api_state": 1,
|
|
148
|
-
"api_title": "はじめての「遠征」!",
|
|
149
|
-
"api_detail": "艦隊を「遠征」に出発させよう!",
|
|
150
|
-
"api_voice_id": 0,
|
|
151
|
-
"api_get_material": [30, 30, 30, 30],
|
|
152
|
-
"api_bonus_flag": 1,
|
|
153
|
-
"api_progress_flag": 0,
|
|
154
|
-
"api_invalid_flag": 0
|
|
155
|
-
},
|
|
156
|
-
{
|
|
157
|
-
"api_no": 503,
|
|
158
|
-
"api_category": 5,
|
|
159
|
-
"api_type": 1,
|
|
160
|
-
"api_label_type": 2,
|
|
161
|
-
"api_state": 1,
|
|
162
|
-
"api_title": "艦隊大整備!",
|
|
163
|
-
"api_detail": "各艦隊から整備が必要な艦を5隻以上ドック入りさせ、大規模な整備をしよう!",
|
|
164
|
-
"api_voice_id": 0,
|
|
165
|
-
"api_get_material": [30, 30, 30, 30],
|
|
166
|
-
"api_bonus_flag": 1,
|
|
167
|
-
"api_progress_flag": 0,
|
|
168
|
-
"api_invalid_flag": 0
|
|
169
|
-
},
|
|
170
|
-
{
|
|
171
|
-
"api_no": 605,
|
|
172
|
-
"api_category": 6,
|
|
173
|
-
"api_type": 1,
|
|
174
|
-
"api_label_type": 2,
|
|
175
|
-
"api_state": 1,
|
|
176
|
-
"api_title": "新装備「開発」指令",
|
|
177
|
-
"api_detail": "「工廠」で装備アイテムを新たに「開発」しよう(失敗もOK)!",
|
|
178
|
-
"api_voice_id": 0,
|
|
179
|
-
"api_get_material": [40, 40, 40, 40],
|
|
180
|
-
"api_bonus_flag": 1,
|
|
181
|
-
"api_progress_flag": 0,
|
|
182
|
-
"api_invalid_flag": 0
|
|
183
|
-
},
|
|
184
|
-
{
|
|
185
|
-
"api_no": 612,
|
|
186
|
-
"api_category": 6,
|
|
187
|
-
"api_type": 4,
|
|
188
|
-
"api_label_type": 1,
|
|
189
|
-
"api_state": 1,
|
|
190
|
-
"api_title": "輸送用ドラム缶の準備",
|
|
191
|
-
"api_detail": "「工廠」で装備アイテムを3回「廃棄」して、輸送用のドラム缶を準備します。",
|
|
192
|
-
"api_voice_id": 0,
|
|
193
|
-
"api_get_material": [0, 0, 30, 0],
|
|
194
|
-
"api_bonus_flag": 1,
|
|
195
|
-
"api_progress_flag": 0,
|
|
196
|
-
"api_invalid_flag": 0
|
|
197
|
-
},
|
|
198
|
-
{
|
|
199
|
-
"api_no": 617,
|
|
200
|
-
"api_category": 6,
|
|
201
|
-
"api_type": 4,
|
|
202
|
-
"api_label_type": 1,
|
|
203
|
-
"api_state": 1,
|
|
204
|
-
"api_title": "「伊良湖」の準備",
|
|
205
|
-
"api_detail": "「工廠」で不要な装備アイテムをいくつか「廃棄」して、新型給糧艦召喚の準備をしましょう!",
|
|
206
|
-
"api_voice_id": 0,
|
|
207
|
-
"api_get_material": [100, 0, 0, 0],
|
|
208
|
-
"api_bonus_flag": 1,
|
|
209
|
-
"api_progress_flag": 0,
|
|
210
|
-
"api_invalid_flag": 0
|
|
211
|
-
},
|
|
212
|
-
{
|
|
213
|
-
"api_no": 634,
|
|
214
|
-
"api_category": 6,
|
|
215
|
-
"api_type": 4,
|
|
216
|
-
"api_label_type": 1,
|
|
217
|
-
"api_state": 1,
|
|
218
|
-
"api_title": "新家具の準備",
|
|
219
|
-
"api_detail": "「工廠」で装備アイテムを9つ「廃棄」して、新家具の準備をします。",
|
|
220
|
-
"api_voice_id": 0,
|
|
221
|
-
"api_get_material": [0, 0, 90, 0],
|
|
222
|
-
"api_bonus_flag": 1,
|
|
223
|
-
"api_progress_flag": 0,
|
|
224
|
-
"api_invalid_flag": 0
|
|
225
|
-
},
|
|
226
|
-
{
|
|
227
|
-
"api_no": 679,
|
|
228
|
-
"api_category": 6,
|
|
229
|
-
"api_type": 4,
|
|
230
|
-
"api_label_type": 1,
|
|
231
|
-
"api_state": 1,
|
|
232
|
-
"api_title": "対空兵装の拡充",
|
|
233
|
-
"api_detail": "対空兵装の整備拡充を実施する!「中口径主砲」系装備x6、「副砲」系装備x3を廃棄、<br>ボーキサイト900を準備せよ! ※任務達成後、準備した資源は消費します。",
|
|
234
|
-
"api_voice_id": 0,
|
|
235
|
-
"api_get_material": [0, 100, 0, 0],
|
|
236
|
-
"api_bonus_flag": 1,
|
|
237
|
-
"api_progress_flag": 0,
|
|
238
|
-
"api_invalid_flag": 0
|
|
239
|
-
},
|
|
240
|
-
{
|
|
241
|
-
"api_no": 691,
|
|
242
|
-
"api_category": 6,
|
|
243
|
-
"api_type": 4,
|
|
244
|
-
"api_label_type": 1,
|
|
245
|
-
"api_state": 1,
|
|
246
|
-
"api_title": "提督室のリフォーム",
|
|
247
|
-
"api_detail": "提督室のリフォームを実施する!まずは装備の整理から!「中口径主砲」系装備x4、「副砲」系装備x4、<br>「機銃」系装備x4を廃棄、ボーキサイト1,600を準備せよ! ※任務達成後、準備した資源は消費します。",
|
|
248
|
-
"api_voice_id": 0,
|
|
249
|
-
"api_get_material": [200, 0, 0, 0],
|
|
250
|
-
"api_bonus_flag": 1,
|
|
251
|
-
"api_progress_flag": 0,
|
|
252
|
-
"api_invalid_flag": 0
|
|
253
|
-
},
|
|
254
|
-
{
|
|
255
|
-
"api_no": 692,
|
|
256
|
-
"api_category": 6,
|
|
257
|
-
"api_type": 4,
|
|
258
|
-
"api_label_type": 1,
|
|
259
|
-
"api_state": 1,
|
|
260
|
-
"api_title": "水上艦艇装備工廠の整備",
|
|
261
|
-
"api_detail": "水上艦艇装備工廠の整備を実施する!「小口径主砲」系装備x5、「大口径主砲」系装備x5、<br>「水偵」系装備x5を廃棄、鋼材3,000を準備せよ! ※任務達成後、準備した資源は消費します。",
|
|
262
|
-
"api_voice_id": 0,
|
|
263
|
-
"api_get_material": [0, 0, 0, 100],
|
|
264
|
-
"api_bonus_flag": 1,
|
|
265
|
-
"api_progress_flag": 0,
|
|
266
|
-
"api_invalid_flag": 0
|
|
267
|
-
},
|
|
268
|
-
{
|
|
269
|
-
"api_no": 702,
|
|
270
|
-
"api_category": 7,
|
|
271
|
-
"api_type": 1,
|
|
272
|
-
"api_label_type": 2,
|
|
273
|
-
"api_state": 1,
|
|
274
|
-
"api_title": "艦の「近代化改修」を実施せよ!",
|
|
275
|
-
"api_detail": "近代化改修を実施して、2回以上これを成功させよ!",
|
|
276
|
-
"api_voice_id": 0,
|
|
277
|
-
"api_get_material": [20, 20, 50, 0],
|
|
278
|
-
"api_bonus_flag": 1,
|
|
279
|
-
"api_progress_flag": 0,
|
|
280
|
-
"api_invalid_flag": 0
|
|
281
|
-
},
|
|
282
|
-
{
|
|
283
|
-
"api_no": 810,
|
|
284
|
-
"api_category": 8,
|
|
285
|
-
"api_type": 4,
|
|
286
|
-
"api_label_type": 1,
|
|
287
|
-
"api_state": 1,
|
|
288
|
-
"api_title": "製油所地帯を防衛せよ!",
|
|
289
|
-
"api_detail": "水雷戦隊を製油所地帯沿岸に展開!同海域に出没する敵艦隊を三回以上撃滅せよ!",
|
|
290
|
-
"api_voice_id": 0,
|
|
291
|
-
"api_get_material": [400, 0, 0, 0],
|
|
292
|
-
"api_bonus_flag": 1,
|
|
293
|
-
"api_progress_flag": 0,
|
|
294
|
-
"api_invalid_flag": 0
|
|
295
|
-
},
|
|
296
|
-
{
|
|
297
|
-
"api_no": 817,
|
|
298
|
-
"api_category": 8,
|
|
299
|
-
"api_type": 4,
|
|
300
|
-
"api_label_type": 1,
|
|
301
|
-
"api_state": 2,
|
|
302
|
-
"api_title": "新編艦隊、南西諸島防衛線へ急行せよ!",
|
|
303
|
-
"api_detail": "水雷戦隊を含む新編艦隊を南西諸島防衛線に展開、同方面に来襲する敵艦隊を撃破せよ!",
|
|
304
|
-
"api_voice_id": 0,
|
|
305
|
-
"api_get_material": [300, 300, 300, 0],
|
|
306
|
-
"api_bonus_flag": 1,
|
|
307
|
-
"api_progress_flag": 0,
|
|
308
|
-
"api_invalid_flag": 0
|
|
309
|
-
},
|
|
310
|
-
{
|
|
311
|
-
"api_no": 831,
|
|
312
|
-
"api_category": 8,
|
|
313
|
-
"api_type": 4,
|
|
314
|
-
"api_label_type": 1,
|
|
315
|
-
"api_state": 1,
|
|
316
|
-
"api_title": "春の海上警備行動!艦隊、抜錨せよ!",
|
|
317
|
-
"api_detail": "春季特別任務:旗艦に軽巡級・軽空母・水上機母艦を配備、駆逐艦・海防艦計4隻以上を含む艦隊を編成、<br>鎮守府正面海域、南西諸島沖、製油所地帯沿岸、南西諸島防衛線の海上警備を実施、敵を発見撃滅せよ!",
|
|
318
|
-
"api_voice_id": 0,
|
|
319
|
-
"api_get_material": [250, 250, 0, 250],
|
|
320
|
-
"api_bonus_flag": 1,
|
|
321
|
-
"api_progress_flag": 0,
|
|
322
|
-
"api_invalid_flag": 0
|
|
323
|
-
},
|
|
324
|
-
{
|
|
325
|
-
"api_no": 1112,
|
|
326
|
-
"api_category": 11,
|
|
327
|
-
"api_type": 4,
|
|
328
|
-
"api_label_type": 1,
|
|
329
|
-
"api_state": 2,
|
|
330
|
-
"api_title": "鎮守府「大掃除」祭り!",
|
|
331
|
-
"api_detail": "「小口径主砲」「中口径主砲」「大口径主砲」各x4装備を廃棄、ドラム缶(輸送用)x1、開発資材x10<br>鋼材1,800を準備せよ!(任務達成後、準備した資源・ドラム缶(輸送用)・開発資材は消費)",
|
|
332
|
-
"api_voice_id": 0,
|
|
333
|
-
"api_get_material": [0, 650, 0, 550],
|
|
334
|
-
"api_bonus_flag": 1,
|
|
335
|
-
"api_progress_flag": 0,
|
|
336
|
-
"api_invalid_flag": 0
|
|
337
|
-
}
|
|
338
|
-
]
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { version, QuestData } from '../../build/kcanotifyGamedata'
|
|
2
|
-
|
|
3
|
-
test('should Kcanotify Game data version correct', () => {
|
|
4
|
-
expect(version).toMatchInlineSnapshot(`"2024020301"`)
|
|
5
|
-
})
|
|
6
|
-
|
|
7
|
-
test('should Kcanotify Game data keys correct', () => {
|
|
8
|
-
expect(Object.keys(QuestData)).toMatchInlineSnapshot(`
|
|
9
|
-
[
|
|
10
|
-
"zh-CN",
|
|
11
|
-
"zh-TW",
|
|
12
|
-
"ja-JP",
|
|
13
|
-
"en-US",
|
|
14
|
-
"ko-KR",
|
|
15
|
-
]
|
|
16
|
-
`)
|
|
17
|
-
})
|
|
18
|
-
|
|
19
|
-
describe('should format correct', () => {
|
|
20
|
-
Object.keys(QuestData).forEach((lang) => {
|
|
21
|
-
test(`${lang} key format`, () => {
|
|
22
|
-
Object.keys(QuestData[lang as keyof typeof QuestData]).forEach((key) => {
|
|
23
|
-
// gameId should not extra space
|
|
24
|
-
expect(key.trim()).toEqual(key)
|
|
25
|
-
// gameId should be number
|
|
26
|
-
expect(String(+key)).toEqual(key)
|
|
27
|
-
})
|
|
28
|
-
})
|
|
29
|
-
})
|
|
30
|
-
})
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { KcwikiQuestData, version } from '../../build/kcQuestsData'
|
|
2
|
-
import newQuestData from '../../build/kcQuestsData/quests-scn-new.json'
|
|
3
|
-
|
|
4
|
-
describe('should version correct', () => {
|
|
5
|
-
test('should KcwikiQuestData Game data version correct', () => {
|
|
6
|
-
expect(version).toMatchInlineSnapshot(
|
|
7
|
-
`"e44ec03876e61799d71604960b165c8eec5b60a5"`,
|
|
8
|
-
)
|
|
9
|
-
})
|
|
10
|
-
|
|
11
|
-
test('should KcwikiQuestData Game data keys correct', () => {
|
|
12
|
-
expect(Object.keys(KcwikiQuestData)).toMatchInlineSnapshot(`
|
|
13
|
-
[
|
|
14
|
-
"zh-CN",
|
|
15
|
-
]
|
|
16
|
-
`)
|
|
17
|
-
})
|
|
18
|
-
})
|
|
19
|
-
|
|
20
|
-
describe('should format correct', () => {
|
|
21
|
-
test('key format', () => {
|
|
22
|
-
Object.keys(KcwikiQuestData['zh-CN']).forEach((key) => {
|
|
23
|
-
// gameId should not extra space
|
|
24
|
-
expect(key).toEqual(key.trim())
|
|
25
|
-
// gameId should be number
|
|
26
|
-
expect(key).toEqual(String(+key))
|
|
27
|
-
})
|
|
28
|
-
})
|
|
29
|
-
|
|
30
|
-
test('new quest key format', () => {
|
|
31
|
-
Object.keys(newQuestData).forEach((gameId) => {
|
|
32
|
-
// gameId should not extra space
|
|
33
|
-
expect(gameId).toEqual(gameId.trim())
|
|
34
|
-
// gameId should be number
|
|
35
|
-
expect(gameId).toEqual(String(gameId))
|
|
36
|
-
})
|
|
37
|
-
})
|
|
38
|
-
})
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import questCategory from '../../build/questCategory.json'
|
|
2
|
-
import { KcwikiQuestData } from '../../build/kcQuestsData'
|
|
3
|
-
import { QuestData as KcaQuestData } from '../../build/kcanotifyGamedata'
|
|
4
|
-
|
|
5
|
-
describe('should questCategory correct', () => {
|
|
6
|
-
test('length', () => {
|
|
7
|
-
expect(questCategory.dailyQuest.length).toMatchInlineSnapshot(`23`)
|
|
8
|
-
expect(questCategory.weeklyQuest.length).toMatchInlineSnapshot(`17`)
|
|
9
|
-
expect(questCategory.monthlyQuest.length).toMatchInlineSnapshot(`11`)
|
|
10
|
-
expect(questCategory.quarterlyQuest.length).toMatchInlineSnapshot(`27`)
|
|
11
|
-
expect(questCategory.yearlyQuest.length).toMatchInlineSnapshot(`46`)
|
|
12
|
-
expect(questCategory.singleQuest.length).toMatchInlineSnapshot(`473`)
|
|
13
|
-
})
|
|
14
|
-
|
|
15
|
-
test('snapshot', () => {
|
|
16
|
-
const mergeData = {
|
|
17
|
-
...KcaQuestData['zh-CN'],
|
|
18
|
-
...KcwikiQuestData['zh-CN'],
|
|
19
|
-
}
|
|
20
|
-
const humanReadableData = Object.fromEntries(
|
|
21
|
-
Object.entries(questCategory).map(([key, val]) => [
|
|
22
|
-
key,
|
|
23
|
-
val
|
|
24
|
-
.sort((a, b) => a - b)
|
|
25
|
-
.map((gameId) => ({
|
|
26
|
-
gameId,
|
|
27
|
-
code: mergeData[String(gameId) as keyof typeof mergeData].code,
|
|
28
|
-
name: mergeData[String(gameId) as keyof typeof mergeData].name,
|
|
29
|
-
})),
|
|
30
|
-
]),
|
|
31
|
-
)
|
|
32
|
-
|
|
33
|
-
expect(humanReadableData).toMatchSnapshot({
|
|
34
|
-
singleQuest: expect.any(Array),
|
|
35
|
-
})
|
|
36
|
-
})
|
|
37
|
-
})
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
calcQuestMap,
|
|
3
|
-
getCompletedQuest,
|
|
4
|
-
getLockedQuest,
|
|
5
|
-
getPostQuestIds,
|
|
6
|
-
getPreQuestIds,
|
|
7
|
-
getQuestCodeByGameId,
|
|
8
|
-
} from '../questHelper'
|
|
9
|
-
|
|
10
|
-
describe('questHelper', () => {
|
|
11
|
-
test('should getQuestCodeByGameId correct', () => {
|
|
12
|
-
expect(getQuestCodeByGameId(0)).toEqual(null)
|
|
13
|
-
expect(getQuestCodeByGameId(101)).toEqual('A1')
|
|
14
|
-
})
|
|
15
|
-
|
|
16
|
-
test('should getPreQuestIds correct', () => {
|
|
17
|
-
expect(getPreQuestIds(101)).toEqual([])
|
|
18
|
-
expect(getPreQuestIds(102)).toEqual([101])
|
|
19
|
-
expect(getPreQuestIds(236)).toEqual([235, 273])
|
|
20
|
-
})
|
|
21
|
-
|
|
22
|
-
test('should getPostQuestIds correct', () => {
|
|
23
|
-
expect(getPostQuestIds(101)).toEqual([102])
|
|
24
|
-
expect(getPostQuestIds(105)).toEqual([106, 108, 174, 254, 401, 612])
|
|
25
|
-
expect(getPostQuestIds(140)).toEqual([])
|
|
26
|
-
})
|
|
27
|
-
|
|
28
|
-
test('should 101 no completed quest', () => {
|
|
29
|
-
expect(getCompletedQuest([101])).toEqual({})
|
|
30
|
-
})
|
|
31
|
-
|
|
32
|
-
test('should getCompletedQuest quest match snapshot', () => {
|
|
33
|
-
expect(calcQuestMap([817], getPreQuestIds)).toMatchSnapshot()
|
|
34
|
-
})
|
|
35
|
-
|
|
36
|
-
test('should 236 getCompletedQuest correct', () => {
|
|
37
|
-
expect(calcQuestMap([236], getPreQuestIds)).toMatchSnapshot()
|
|
38
|
-
})
|
|
39
|
-
|
|
40
|
-
test('should 101 locked quests match snapshot', () => {
|
|
41
|
-
expect(getLockedQuest([101])).toMatchSnapshot()
|
|
42
|
-
})
|
|
43
|
-
|
|
44
|
-
test('should 196 getLockedQuest correct', () => {
|
|
45
|
-
expect(getLockedQuest([196])).toMatchSnapshot()
|
|
46
|
-
})
|
|
47
|
-
})
|