diff --git a/src/ArchonCrystal.js b/src/ArchonCrystal.js index ecf24bf..d4aca76 100644 --- a/src/ArchonCrystal.js +++ b/src/ArchonCrystal.js @@ -8,19 +8,19 @@ export default class ArchonCrystal { /** * * @param {Object} crystal The archon crystal object - * @param {string} local The locale to get translations in + * @param {string} locale The locale to get translations in */ - constructor(crystal, local) { + constructor(crystal, locale = 'en') { /** * Archon shard color * @type {String} */ - this.color = archonShardColor(crystal.Color, local); + this.color = archonShardColor(crystal.Color, locale); /** * Archon shard modifier * @type {String} */ - this.modifier = archonShardUpgradeType(crystal.Color, crystal.UpgradeType, local); + this.modifier = archonShardUpgradeType(crystal.Color, crystal.UpgradeType, locale); } } diff --git a/src/Mission.js b/src/Mission.js index 27730bd..bf72da6 100644 --- a/src/Mission.js +++ b/src/Mission.js @@ -10,7 +10,7 @@ export default class Mission { * @param {Object} mission The mission data * @param {string} locale The locale to return in */ - constructor(mission, locale) { + constructor(mission, locale = 'en') { const uniqueName = mission.type || mission.Tag; /** diff --git a/src/Profile.js b/src/Profile.js index c7d5d34..663f653 100644 --- a/src/Profile.js +++ b/src/Profile.js @@ -17,7 +17,7 @@ export default class Profile { * @param {Object} profile The profile data to parse * @param {string} locale The locale to return in where possible */ - constructor(profile, locale) { + constructor(profile, locale = 'en') { /** * Player's acount ID * @type {Stirng} diff --git a/src/ProfileParser.js b/src/ProfileParser.js index bd128b8..43ba811 100644 --- a/src/ProfileParser.js +++ b/src/ProfileParser.js @@ -13,7 +13,7 @@ export default class ProfileParser { * @param {Object} data The data returned by getProfile endpoint * @param {string} locale The locale to return where possible */ - constructor(data, locale) { + constructor(data, locale = 'en') { /** * Player's profile * @type {Profile} diff --git a/src/Syndicate.js b/src/Syndicate.js index 0d42882..abf6f68 100644 --- a/src/Syndicate.js +++ b/src/Syndicate.js @@ -9,7 +9,7 @@ export default class Syndicate { * @param {Object} affiliation The syndicate data * @param {string} locale locale code */ - constructor(affiliation, locale) { + constructor(affiliation, locale = 'en') { // TODO: name is readable but still might want to clean them up // i.e "NewLokaSyndicate" can be "New Loka"" instead diff --git a/test/unit/archonCrystal.spec.js b/test/unit/archonCrystal.spec.js index 27e92cf..a80e3ec 100644 --- a/test/unit/archonCrystal.spec.js +++ b/test/unit/archonCrystal.spec.js @@ -11,7 +11,7 @@ describe('ArchonShard', () => { UpgradeType: '/Lotus/Upgrades/Invigorations/ArchonCrystalUpgrades/ArchonCrystalUpgradeWarframeArmourMaxMythic', }; - const shard = new ArchonCrystal(shardData, 'en'); + const shard = new ArchonCrystal(shardData); assert.strictEqual(shard.color, 'Tauforged Azure'); assert.strictEqual(shard.modifier, '+225 Armor'); diff --git a/test/unit/mission.spec.js b/test/unit/mission.spec.js index b7c1363..51962d6 100644 --- a/test/unit/mission.spec.js +++ b/test/unit/mission.spec.js @@ -25,7 +25,7 @@ describe('Mission', () => { type: 'SolNode35', }; - const mission = new Mission(data, 'en'); + const mission = new Mission(data); assert.strictEqual(mission.node, 'Arcadia (Mars)'); assert.strictEqual(mission.nodeKey, data.type); diff --git a/test/unit/mock.spec.js b/test/unit/mock.spec.js index ca244c3..93d0ab0 100644 --- a/test/unit/mock.spec.js +++ b/test/unit/mock.spec.js @@ -11,8 +11,8 @@ describe('Mock ProfileParser', () => { it('should handle real data', function () { this.timeout(20000); - assert.isOk(new ProfileParser(ornstein, 'en')); - assert.isOk(new ProfileParser(tobiah, 'en')); + assert.isOk(new ProfileParser(ornstein)); + assert.isOk(new ProfileParser(tobiah)); }); }); }); diff --git a/test/unit/stats.spec.js b/test/unit/stats.spec.js index aeb7cb7..0feb3b4 100644 --- a/test/unit/stats.spec.js +++ b/test/unit/stats.spec.js @@ -11,8 +11,8 @@ describe('Mock ProfileParser', () => { it('should handle real data', function () { this.timeout(10000); - assert.isOk(new Stats(ornstein.Stats, 'en')); - assert.isOk(new Stats(tobiah.Stats, 'en')); + assert.isOk(new Stats(ornstein.Stats)); + assert.isOk(new Stats(tobiah.Stats)); }); }); }); diff --git a/test/unit/xpinfo.spec.js b/test/unit/xpinfo.spec.js index d0e78f4..ed22587 100644 --- a/test/unit/xpinfo.spec.js +++ b/test/unit/xpinfo.spec.js @@ -11,7 +11,7 @@ describe('XpInfo', () => { XP: 785691, }; - const xp = new XpInfo(data, 'en'); + const xp = new XpInfo(data); assert.strictEqual(xp.uniqueName, '/Lotus/Weapons/Grineer/LongGuns/GrineerAssaultRifle/TwinGrakatas'); assert.strictEqual(xp.item.name, 'Twin Grakatas');