feat: add startMonitor, stopMonitor, cleanupAllShards module exports

This commit is contained in:
cottongin
2026-03-20 11:25:01 -04:00
parent de395d3a28
commit 1c4c8bc19c
2 changed files with 164 additions and 1 deletions

View File

@@ -376,6 +376,22 @@ describe('EcastShardClient', () => {
});
});
describe('module exports', () => {
const { startMonitor, stopMonitor, cleanupAllShards } = require('../../backend/utils/ecast-shard-client');
test('startMonitor is exported', () => {
expect(typeof startMonitor).toBe('function');
});
test('stopMonitor is exported', () => {
expect(typeof stopMonitor).toBe('function');
});
test('cleanupAllShards is exported', () => {
expect(typeof cleanupAllShards).toBe('function');
});
});
describe('handleError with code 2027', () => {
test('marks game as finished and emits events on room-closed error', () => {
const events = [];