Skip to content

Commit d122c49

Browse files
committed
Tests: refactor tests and bump version
* use assert.throws instead of dirty try catch construct * converted test deck codes into JSON * add _Shurima_ deck in codes
1 parent be64bb9 commit d122c49

File tree

5 files changed

+477
-429
lines changed

5 files changed

+477
-429
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "runeterra",
3-
"version": "3.0.0",
3+
"version": "3.0.1",
44
"description": "Legends of Runeterra deck code encoder/decoder",
55
"main": "src/index.js",
66
"types": "index.d.ts",

src/Faction.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class Faction {
1515
}
1616

1717
static fromID (id) {
18-
const [shortCode, factionId] = Object.entries(Faction.FACTIONS).find(([shortCode, factionId]) => factionId === id) || []
18+
const [shortCode, factionId] = Object.entries(Faction.FACTIONS).find(([, factionId]) => factionId === id) || []
1919

2020
if (factionId === undefined) {
2121
throw new TypeError('Invalid faction id. It is possible you need to upgrade the runeterra package.')

0 commit comments

Comments
 (0)