Skip to content

Commit cb667e4

Browse files
committed
Add tests for and fix nezroy#4
1 parent af572a3 commit cb667e4

2 files changed

Lines changed: 15 additions & 1 deletion

File tree

‎src/map.System.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ exports.Create = function(tbl, ID) {
5555

5656
obj.ID = nID;
5757
obj.name = sys[col.solarSystemName];
58-
obj.regionID = sys[col.regionId];
58+
obj.regionID = sys[col.regionID];
5959
obj.constellationID = sys[col.constellationID];
6060
obj.pos = {
6161
x: sys[col.center][0],

‎test/spec/map.System.spec.js‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,4 +127,18 @@ describe("map.System systems", function() {
127127
expect(sys4.pos.z).toEqual(96773224779781040);
128128
});
129129

130+
it("have expected region", function() {
131+
expect(sys1.regionID).toEqual(10000043);
132+
expect(sys2.regionID).toEqual(10000037);
133+
expect(sys3.regionID).toEqual(10000067);
134+
expect(sys4.regionID).toEqual(10000013);
135+
});
136+
137+
it("have expected constellation", function() {
138+
expect(sys1.constellationID).toEqual(20000322);
139+
expect(sys2.constellationID).toEqual(20000447);
140+
expect(sys3.constellationID).toEqual(20000771);
141+
expect(sys4.constellationID).toEqual(20000155);
142+
});
143+
130144
});

0 commit comments

Comments
 (0)