Skip to content

armgit / TREK

Public Imported from GitHub
0

The most complete open-source travel planner: real-time collaboration, bookings, budgets, packing lists, journals, offline PWA, SSO and an AI-ready MCP server, with planet-wide place search and routing built in.

test(oidc): narrow the logout token check with in, as the server compiles without strictNullChecks

Maurice2186d8b230dc
diff --git a/server/tests/unit/nest/oidc-backchannel.service.test.ts b/server/tests/unit/nest/oidc-backchannel.service.test.ts
index be7329165..a61f9aedf 100644
--- a/server/tests/unit/nest/oidc-backchannel.service.test.ts
+++ b/server/tests/unit/nest/oidc-backchannel.service.test.ts
@@ -150,7 +150,7 @@ async function revokedAt(id: string): Promise<string | null | undefined> {
/** The reason validateLogoutToken gives for a token. */
async function reasonFor(token: string, config: OidcConfig = CONFIG): Promise<string> {
const check = await service().validateLogoutToken(token, config);
- return check.valid ? 'valid' : check.reason;
+ return 'reason' in check ? check.reason : 'valid';
}
describe('OidcBackchannelService.validateLogoutToken: section 2.6, one refusal per check', () => {