feat(framework): server testing utils, transaction storage simplify, pathfinding tests (#384)
## Server Testing Utils - Add TestServer, TestClient, MockRoom for unit testing - Export testing utilities from @esengine/server/testing ## Transaction Storage (BREAKING) - Simplify RedisStorage/MongoStorage to factory pattern only - Remove DI client injection option - Add lazy connection and Symbol.asyncDispose support - Add 161 unit tests with full coverage ## Pathfinding Tests - Add 150 unit tests covering all components - BinaryHeap, Heuristics, AStarPathfinder, GridMap, NavMesh, PathSmoother ## Docs - Update storage.md for new factory pattern API
This commit is contained in:
@@ -197,9 +197,9 @@ export class RoomManager {
|
||||
)
|
||||
}
|
||||
|
||||
private _findAvailableRoom(name: string): Room | undefined {
|
||||
private _findAvailableRoom(name: string): Room | null {
|
||||
const def = this._definitions.get(name)
|
||||
if (!def) return undefined
|
||||
if (!def) return null
|
||||
|
||||
for (const room of this._rooms.values()) {
|
||||
if (
|
||||
@@ -212,7 +212,7 @@ export class RoomManager {
|
||||
}
|
||||
}
|
||||
|
||||
return undefined
|
||||
return null
|
||||
}
|
||||
|
||||
private _generateRoomId(): string {
|
||||
|
||||
Reference in New Issue
Block a user