chore: adds tests

This commit is contained in:
2026-04-23 23:36:32 -03:00
parent dda6942228
commit a60e686407
7 changed files with 4833 additions and 10 deletions

View File

@@ -0,0 +1,35 @@
/**
* Minimal Screeps global mocks used across tests.
*/
// Constants
(global as any).RESOURCE_ENERGY = 'energy';
(global as any).ERR_NOT_IN_RANGE = -9;
(global as any).OK = 0;
(global as any).WORK = 'work';
(global as any).CARRY = 'carry';
(global as any).MOVE = 'move';
// RoomPosition constructor mock
(global as any).RoomPosition = class RoomPosition {
x: number;
y: number;
roomName: string;
constructor(x: number, y: number, roomName: string) {
this.x = x;
this.y = y;
this.roomName = roomName;
}
getRangeTo(_target: any): number {
return 0;
}
};
// Game mock
(global as any).Game = {
getObjectById: jest.fn(),
};
export {};