diff --git a/apps/portal-bff/src/structures/structure-kind.spec.ts b/apps/portal-bff/src/structures/structure-kind.spec.ts index 55e21e9..6745e42 100644 --- a/apps/portal-bff/src/structures/structure-kind.spec.ts +++ b/apps/portal-bff/src/structures/structure-kind.spec.ts @@ -35,7 +35,10 @@ describe('isStructureKind', () => { }); it('narrows the type at the call site', () => { - const candidate: string = 'medico_social'; + // Round-trip through `String()` to widen the literal to `string`. + // Without this the inferred type is `'medico_social'`, already a + // StructureKind subtype — the narrowing check would be vacuous. + const candidate = String('medico_social'); if (!isStructureKind(candidate)) { throw new Error('unreachable — candidate is a known kind'); }