• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

WFCD / arsenal-parser / 24108763414

07 Apr 2026 11:07PM UTC coverage: 64.375%. First build
24108763414

Pull #324

github

web-flow
Merge 3b5b3d6b1 into 63d9872cb
Pull Request #324: feat: typescript migration

145 of 162 branches covered (89.51%)

Branch coverage included in aggregate %.

267 of 478 new or added lines in 10 files covered. (55.86%)

267 of 478 relevant lines covered (55.86%)

3.71 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

64.44
/src/ArsenalParser.ts
1
import Archwing from './Archwing.js';
1✔
2
import Companion, { type RawCompanion } from './Companion.js';
1✔
3
import Mech from './Mech.js';
1✔
4
import Amp from './OperatorAmp.js';
1✔
5
import Parazon from './Parazon.js';
1✔
6
import Player, { type PlayerInformation } from './Player.js';
1✔
7
import type BaseObject from './supporting/BaseObject.js';
1✔
8
import Warframe from './Warframe.js';
1✔
9
import Weapon, { type RawWeapon } from './Weapon.js';
1✔
NEW
10

×
NEW
11
export interface BaseArsenalData {
×
NEW
12
  accountInfo: PlayerInformation;
×
NEW
13
  loadOuts: BaseLoadouts;
×
NEW
14
}
×
NEW
15

×
NEW
16
export interface BaseLoadouts {
×
NEW
17
  NORMAL: {
×
NEW
18
    warframe: BaseObject;
×
NEW
19
    primary: RawWeapon;
×
NEW
20
    secondary: RawWeapon;
×
NEW
21
    melee: RawWeapon;
×
NEW
22
    heavy: RawWeapon;
×
NEW
23
    exalted: RawWeapon | RawCompanion;
×
NEW
24
  };
×
NEW
25
  ARCHWING: { archwing: BaseObject; primary: RawWeapon; melee: RawWeapon };
×
NEW
26
  DATAKNIFE: { parazon: BaseObject; primary: BaseObject };
×
NEW
27
  OPERATOR: { amp: BaseObject };
×
NEW
28
  SENTINEL: { roboticweapon?: RawWeapon; companion?: RawCompanion };
×
NEW
29
  MECH: { mech: BaseObject; heavy: RawWeapon; exalted: RawWeapon };
×
NEW
30
}
×
NEW
31

×
NEW
32
export interface ArsenalLoadout {
×
NEW
33
  warframe: Warframe;
×
NEW
34
  primary?: Weapon;
×
NEW
35
  secondary?: Weapon;
×
NEW
36
  melee?: Weapon;
×
NEW
37
  heavy?: Weapon;
×
NEW
38
  exalted?: Weapon;
×
NEW
39
  vechiles?: VechilesLoadout;
×
NEW
40
  parazon?: Parazon;
×
NEW
41
  amp?: Amp;
×
NEW
42
  companion?: Companion;
×
NEW
43
  roboticweapon?: Weapon;
×
NEW
44
}
×
NEW
45

×
NEW
46
export interface VechilesLoadout {
×
NEW
47
  archwing?: Archwing;
×
NEW
48
  primary?: Weapon;
×
NEW
49
  melee?: Weapon;
×
NEW
50
  necramech?: { mech: Mech; heavy: Weapon; exalted: Weapon };
×
NEW
51
}
×
NEW
52

×
NEW
53
export default class ArsenalData {
✔
54
  account: Player;
7✔
55
  loadout: ArsenalLoadout;
7✔
56
  exalted?: Companion;
1✔
57

1✔
58
  constructor(data: BaseArsenalData) {
1✔
59
    this.account = new Player(data.accountInfo);
6✔
60

6✔
61
    const { NORMAL, ARCHWING, DATAKNIFE, OPERATOR, SENTINEL, MECH } = data.loadOuts;
6✔
62

1✔
63
    const { warframe, primary, secondary, melee, heavy, exalted } = NORMAL;
1!
64

1✔
65
    const { archwing, primary: archPrimary, melee: archMelee } = ARCHWING;
1✔
66
    const { parazon } = DATAKNIFE;
1✔
67
    const { amp } = OPERATOR;
1✔
68
    const { companion, roboticweapon } = SENTINEL;
1✔
69

1✔
70
    this.loadout = { warframe: new Warframe(warframe) };
6✔
NEW
71

×
NEW
72
    if (primary && !primary.hide) this.loadout.primary = new Weapon(primary);
✔
NEW
73
    if (secondary && !secondary.hide) this.loadout.secondary = new Weapon(secondary);
✔
74
    if (melee && !melee.hide) this.loadout.melee = new Weapon(melee);
6✔
75
    if (heavy && !heavy.hide) this.loadout.heavy = new Weapon(heavy);
6✔
76
    if (exalted) {
6✔
77
      if (typeof exalted.skins !== 'undefined') {
3✔
78
        this.exalted = new Companion(exalted as RawCompanion);
1✔
79
      } else {
3✔
80
        this.loadout.exalted = new Weapon(exalted as RawWeapon);
2✔
81
      }
2✔
82
    }
3✔
83

6✔
84
    this.loadout.vechiles = {};
6✔
85
    if (archwing && !archwing.hide) this.loadout.vechiles.archwing = new Archwing(archwing);
6✔
86
    if (archPrimary && !archPrimary.hide) this.loadout.vechiles.primary = new Weapon(archPrimary);
6✔
87
    if (archMelee && !archMelee.hide) this.loadout.vechiles.melee = new Weapon(archMelee);
6✔
88

6✔
89
    if (parazon && !parazon.hide) this.loadout.parazon = new Parazon(parazon);
6✔
90

6✔
91
    if (amp) this.loadout.amp = new Amp(amp);
6✔
92

6✔
93
    if (companion) this.loadout.companion = new Companion(companion);
6✔
94
    if (roboticweapon) this.loadout.roboticweapon = new Weapon(roboticweapon);
6✔
95

6✔
96
    if (MECH) {
6✔
97
      const { mech, heavy: mechLong, exalted: mechExalted } = MECH;
3✔
98

3✔
99
      // Game prevents player from unequiping necramechs or their heavy weapons. If necramech doesn't exist then neither will its slots
3✔
100
      if (mech) {
3✔
101
        this.loadout.vechiles.necramech = {
3✔
102
          mech: new Mech(mech),
3✔
103
          heavy: new Weapon(mechLong),
3✔
104
          exalted: new Weapon(mechExalted),
3✔
105
        };
3✔
106
      }
3✔
107
    }
3✔
108
  }
6✔
109
}
7✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc