Adjust Discord publication and lobby capacity defaults
CI / checks (push) Failing after 7m21s

This commit is contained in:
2026-10-18 17:23:50 -04:00
parent fd00ef5357
commit d715173719
15 changed files with 304 additions and 89 deletions
+6 -5
View File
@@ -199,9 +199,10 @@ describe('Discord signed webhook boundary', () => {
});
describe('Discord configuration and access', () => {
it('defaults to no publication and validates IDs and an explicit bounded allowlist', () => {
it('defaults to all servers with sharing disabled and validates bounded exclusions', () => {
expect(validateDiscordSettings(defaultDiscordSettings)).toEqual(defaultDiscordSettings);
expect(defaultDiscordSettings.enabled).toBe(false);
expect(defaultDiscordSettings.excludedServers).toEqual([]);
expect(defaultDiscordSettings.showPlayers).toBe(false);
expect(defaultDiscordSettings.showAddresses).toBe(false);
expect(defaultDiscordSettings.leaderboardEnabled).toBe(false);
@@ -214,20 +215,20 @@ describe('Discord configuration and access', () => {
expect(() =>
validateDiscordSettings({
...defaultDiscordSettings,
publishedServers: ['../../secrets']
excludedServers: ['../../secrets']
})
).toThrow();
expect(() =>
validateDiscordSettings({
...defaultDiscordSettings,
publishedServers: Array(101).fill('t5_map_1')
excludedServers: Array(101).fill('t5_map_1')
})
).toThrow();
expect(
validateDiscordSettings({
...defaultDiscordSettings,
publishedServers: ['t5_map_2', 't5_map_1', 't5_map_1']
}).publishedServers
excludedServers: ['t5_map_2', 't5_map_1', 't5_map_1']
}).excludedServers
).toEqual(['t5_map_1', 't5_map_2']);
});