Update connection status indicator
This commit is contained in:
1 parent
2e603caeb6
commit
726a7fedc7
8 files changed
+254
-64
No files matched your search
@@ -7,6 +7,7 @@ const { createDashboardStateService } = require('../src/web/lib/dashboard-state'
|
||||
|
||||
test('dashboard state counts active players from the registry heartbeat', async () => {
|
||||
const service = createDashboardStateService({
|
||||
playerServiceName: 'Bridge',
|
||||
pool: {
|
||||
async query(sql) {
|
||||
if (String(sql || '').includes('COUNT(*) AS connected_count')) {
|
||||
@@ -64,6 +65,7 @@ test('dashboard state counts active players from the registry heartbeat', async
|
||||
const state = await service.buildDashboardState();
|
||||
|
||||
assert.equal(state.connectedPlayersCount, 6);
|
||||
assert.equal(state.playerServiceName, 'Bridge');
|
||||
assert.equal(state.playerServiceConnected, true);
|
||||
assert.equal(state.connectedClientsCount, 1);
|
||||
assert.equal(state.clients[0].player_identifier, 'player-alpha');
|
||||
|
||||
Reference in new issue
Block a user