Skip to content

Commit bbffd4e

Browse files
PieterKasclaude
andcommitted
authorization-server/dpop: round-6 test polish
Broaden the negotiateProofAlg fallback test to also assert undefined → ES256 and correct its title ("empty array or absent field") — the contract covers both, though absent is gated upstream in the scenario. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent d01b286 commit bbffd4e

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎src/scenarios/authorization-server/dpop.test.ts‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,8 +153,11 @@ describe('negotiateProofAlg (dpop_signing_alg_values_supported shapes)', () => {
153153
expect(negotiateProofAlg(['ES256K'])).toBeNull();
154154
});
155155

156-
it('falls back to ES256 only for an empty array', () => {
156+
it('falls back to ES256 only for an empty array or an absent field', () => {
157157
expect(negotiateProofAlg([])).toBe('ES256');
158+
// Absent never reaches here in the scenario (the support gate SKIPs upstream),
159+
// but the contract still treats undefined as the empty/best-effort case.
160+
expect(negotiateProofAlg(undefined)).toBe('ES256');
158161
});
159162

160163
it('returns null for a present-but-non-array (malformed) value (→ SKIP)', () => {

0 commit comments

Comments
 (0)