Skip to content

Commit

Permalink
fix: check the right objects for archwing
Browse files Browse the repository at this point in the history
  • Loading branch information
TobiTenno committed Feb 16, 2023
1 parent eb9911a commit 32d33db
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/ArsenalParser.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ module.exports = class ArsenalData {

this.loadout.archwing = {};
if (archwing && !archwing.hide) this.loadout.archwing.archwing = new Archwing(archwing);
if (archPrimary && !archPrimary.hide) this.loadout.archwing.primary = new Weapon(primary);
if (archMelee && !archMelee.hide) this.loadout.archwing.melee = new Weapon(melee);
if (archPrimary && !archPrimary.hide) this.loadout.archwing.primary = new Weapon(archPrimary);
if (archMelee && !archMelee.hide) this.loadout.archwing.melee = new Weapon(archMelee);

if (parazon && !parazon.hide) this.loadout.parazon = new Parazon(parazon);

Expand Down
4 changes: 3 additions & 1 deletion test/regression/module.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ describe('ArsenalData', function () {
describe('#constructor', () => {
it('can parse live data', async function () {
if (!(await working())) this.skip();
assert.isOk(new ArsenalData(await fetch('tobiah')));
const parsed = JSON.parse(JSON.stringify(new ArsenalData(await fetch('tobiah'))));
assert.equal(parsed.account.name, 'Tobiah');
assert.isOk(parsed);
});
});
});

0 comments on commit 32d33db

Please sign in to comment.