Skip to content

Commit 8d9e893

Browse files
Fix tests
1 parent cd86e8f commit 8d9e893

File tree

1 file changed

+63
-9
lines changed

1 file changed

+63
-9
lines changed

server/spec/combat.spec.ts

Lines changed: 63 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,13 @@ describe('combat', () => {
124124
// --------------------------
125125

126126
it('should calculate carrier to star combat - carriers vs. star garrison - defender wins', async () => {
127-
const game = { };
127+
const game = {
128+
settings: {
129+
specialGalaxy: {
130+
combatResolutionMalusStrategy: 'anyCarrier'
131+
}
132+
}
133+
};
128134

129135
const star = {
130136
shipsActual: 10
@@ -161,7 +167,13 @@ describe('combat', () => {
161167
});
162168

163169
it('should calculate carrier to star combat - carriers vs. star garrison - attacker wins', async () => {
164-
const game = { };
170+
const game = {
171+
settings: {
172+
specialGalaxy: {
173+
combatResolutionMalusStrategy: 'anyCarrier'
174+
}
175+
}
176+
};
165177

166178
const star = {
167179
shipsActual: 10
@@ -198,7 +210,13 @@ describe('combat', () => {
198210
});
199211

200212
it('should calculate carrier to star combat - carriers vs. carriers - defender wins', async () => {
201-
const game = { };
213+
const game = {
214+
settings: {
215+
specialGalaxy: {
216+
combatResolutionMalusStrategy: 'anyCarrier'
217+
}
218+
}
219+
};
202220

203221
const star = {
204222
shipsActual: 0
@@ -239,7 +257,13 @@ describe('combat', () => {
239257
});
240258

241259
it('should calculate carrier to star combat - carriers vs. carriers - attacker wins', async () => {
242-
const game = { };
260+
const game = {
261+
settings: {
262+
specialGalaxy: {
263+
combatResolutionMalusStrategy: 'anyCarrier'
264+
}
265+
}
266+
};
243267

244268
const star = {
245269
shipsActual: 0
@@ -282,7 +306,13 @@ describe('combat', () => {
282306
// --------------------------
283307

284308
it('should calculate carrier to carrier combat - mutual destruction', async () => {
285-
const game = { };
309+
const game = {
310+
settings: {
311+
specialGalaxy: {
312+
combatResolutionMalusStrategy: 'anyCarrier'
313+
}
314+
}
315+
};
286316

287317
const defenders = [];
288318

@@ -319,7 +349,13 @@ describe('combat', () => {
319349
});
320350

321351
it('should calculate carrier to carrier combat - defender wins', async () => {
322-
const game = { };
352+
const game = {
353+
settings: {
354+
specialGalaxy: {
355+
combatResolutionMalusStrategy: 'anyCarrier'
356+
}
357+
}
358+
};
323359

324360
const defenders = [];
325361

@@ -356,7 +392,13 @@ describe('combat', () => {
356392
});
357393

358394
it('should calculate carrier to carrier combat - attacker wins', async () => {
359-
const game = { };
395+
const game = {
396+
settings: {
397+
specialGalaxy: {
398+
combatResolutionMalusStrategy: 'anyCarrier'
399+
}
400+
}
401+
};
360402

361403
const defenders = [];
362404

@@ -393,7 +435,13 @@ describe('combat', () => {
393435
});
394436

395437
it('should destroy carriers in carrier to carrier combat if they cannot withstand a single blow - defender wins', async () => {
396-
const game = { };
438+
const game = {
439+
settings: {
440+
specialGalaxy: {
441+
combatResolutionMalusStrategy: 'anyCarrier'
442+
}
443+
}
444+
};
397445

398446
const defenders = [];
399447

@@ -427,7 +475,13 @@ describe('combat', () => {
427475
});
428476

429477
it('should destroy carriers in carrier to carrier combat if they cannot withstand a single blow - attacker wins', async () => {
430-
const game = { };
478+
const game = {
479+
settings: {
480+
specialGalaxy: {
481+
combatResolutionMalusStrategy: 'anyCarrier'
482+
}
483+
}
484+
};
431485

432486
const defenders = [];
433487

0 commit comments

Comments
 (0)