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

Commit

Permalink
Merge pull request #323 from RaenonX-DL/dev
Browse files Browse the repository at this point in the history
v2.15.0 Release
  • Loading branch information
RaenonX authored Oct 4, 2021
2 parents 260d9ef + 5c1b275 commit dcdb4b9
Show file tree
Hide file tree
Showing 43 changed files with 684 additions and 196 deletions.
137 changes: 91 additions & 46 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "dragalia-site-front",
"description": "Frontend of Dragalia Lost info website by OM.",
"repository": "https://github.com/RaenonX-DL/dragalia-site-front",
"version": "2.15.0-beta.1",
"version": "2.15.0",
"engines": {
"node": "14.x",
"npm": "^7.12.0"
Expand Down Expand Up @@ -36,6 +36,7 @@
"next": "^11.1.2",
"next-auth": "^3.29.0",
"node-fetch": "^2.6.2",
"opencc-js": "^1.0.3",
"pm2": "^5.1.1",
"react": "^17.0.2",
"react-audio-player": "^0.17.0",
Expand All @@ -56,6 +57,7 @@
"@types/color": "^3.0.2",
"@types/jest": "^27.0.1",
"@types/mongodb": "^3.6.20",
"@types/opencc-js": "^1.0.0",
"@types/node": "^14.17.14",
"@types/node-fetch": "^2.5.12",
"@types/react": "^17.0.20",
Expand Down
25 changes: 25 additions & 0 deletions src/components/elements/gameData/unit/filter/utils.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -257,4 +257,29 @@ describe('Get filtered unit info', () => {

expect(unitIds).toStrictEqual([10750404]);
});

it('filters using CHS name', async () => {
const inputData: UnitFilterInputData<'unitId'> = overrideObject(
generateFilterInput('unitId'),
{keyword: '谢斯'},
);

const unitIds = getFilteredUnitInfo(inputData, charaInfo, dragonInfo, {})
.map((unit) => unit.id);

expect(unitIds).toStrictEqual([10750404, 10650503, 10950501]);
});

it('filters using CHS alias', async () => {
const inputData: UnitFilterInputData<'unitId'> = overrideObject(
generateFilterInput('unitId'),
{keyword: '龙爸'},
);

// noinspection NonAsciiCharacters
const unitIds = getFilteredUnitInfo(inputData, charaInfo, dragonInfo, {'龍爸': 10750404})
.map((unit) => unit.id);

expect(unitIds).toStrictEqual([10750404]);
});
});
Loading

0 comments on commit dcdb4b9

Please sign in to comment.