Skip to content

Commit

Permalink
feat: expose mission uniqueName (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
SlayerOrnstein authored Jul 25, 2024
1 parent 427801d commit 574470a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Mission.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ export default class Mission {
*/
this.node = node(uniqueName, locale);

/**
* Node unique name
* @type {String}
*/
this.nodeKey = uniqueName;

/**
* Node mission type
* @type {String}
Expand Down
2 changes: 2 additions & 0 deletions test/unit/mission.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ describe('Mission', () => {
const mission = new Mission(data, 'en');

assert.strictEqual(mission.node, 'M Prime (Mercury)');
assert.strictEqual(mission.nodeKey, data.Tag);
assert.strictEqual(mission.missionType, 'Extermination');
assert.strictEqual(mission.faction, 'Crossfire');
});
Expand All @@ -27,6 +28,7 @@ describe('Mission', () => {
const mission = new Mission(data, 'en');

assert.strictEqual(mission.node, 'Arcadia (Mars)');
assert.strictEqual(mission.nodeKey, data.type);
assert.strictEqual(mission.missionType, 'Ancient Retribution');
assert.strictEqual(mission.faction, 'Grineer');
assert.strictEqual(mission.highScore, data.highScore);
Expand Down

0 comments on commit 574470a

Please sign in to comment.