Skip to content
This repository was archived by the owner on Mar 23, 2022. It is now read-only.

Commit dcdb4b9

Browse files
authored
Merge pull request #323 from RaenonX-DL/dev
v2.15.0 Release
2 parents 260d9ef + 5c1b275 commit dcdb4b9

File tree

43 files changed

+684
-196
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+684
-196
lines changed

package-lock.json

Lines changed: 91 additions & 46 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "dragalia-site-front",
33
"description": "Frontend of Dragalia Lost info website by OM.",
44
"repository": "https://github.com/RaenonX-DL/dragalia-site-front",
5-
"version": "2.15.0-beta.1",
5+
"version": "2.15.0",
66
"engines": {
77
"node": "14.x",
88
"npm": "^7.12.0"
@@ -36,6 +36,7 @@
3636
"next": "^11.1.2",
3737
"next-auth": "^3.29.0",
3838
"node-fetch": "^2.6.2",
39+
"opencc-js": "^1.0.3",
3940
"pm2": "^5.1.1",
4041
"react": "^17.0.2",
4142
"react-audio-player": "^0.17.0",
@@ -56,6 +57,7 @@
5657
"@types/color": "^3.0.2",
5758
"@types/jest": "^27.0.1",
5859
"@types/mongodb": "^3.6.20",
60+
"@types/opencc-js": "^1.0.0",
5961
"@types/node": "^14.17.14",
6062
"@types/node-fetch": "^2.5.12",
6163
"@types/react": "^17.0.20",

src/components/elements/gameData/unit/filter/utils.test.tsx

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,4 +257,29 @@ describe('Get filtered unit info', () => {
257257

258258
expect(unitIds).toStrictEqual([10750404]);
259259
});
260+
261+
it('filters using CHS name', async () => {
262+
const inputData: UnitFilterInputData<'unitId'> = overrideObject(
263+
generateFilterInput('unitId'),
264+
{keyword: '谢斯'},
265+
);
266+
267+
const unitIds = getFilteredUnitInfo(inputData, charaInfo, dragonInfo, {})
268+
.map((unit) => unit.id);
269+
270+
expect(unitIds).toStrictEqual([10750404, 10650503, 10950501]);
271+
});
272+
273+
it('filters using CHS alias', async () => {
274+
const inputData: UnitFilterInputData<'unitId'> = overrideObject(
275+
generateFilterInput('unitId'),
276+
{keyword: '龙爸'},
277+
);
278+
279+
// noinspection NonAsciiCharacters
280+
const unitIds = getFilteredUnitInfo(inputData, charaInfo, dragonInfo, {'龍爸': 10750404})
281+
.map((unit) => unit.id);
282+
283+
expect(unitIds).toStrictEqual([10750404]);
284+
});
260285
});

0 commit comments

Comments
 (0)