(t, claim)
| 290 | }) |
| 291 | |
| 292 | async function numericDateNumber(t, claim) { |
| 293 | const jwt = await new EncryptJWT({ [claim]: null }) |
| 294 | .setProtectedHeader({ alg: 'dir', enc: 'A256GCM' }) |
| 295 | .encrypt(t.context.secret) |
| 296 | |
| 297 | await t.throwsAsync(jwtDecrypt(jwt, t.context.secret), { |
| 298 | code: 'ERR_JWT_CLAIM_VALIDATION_FAILED', |
| 299 | message: `"${claim}" claim must be a number`, |
| 300 | }) |
| 301 | } |
| 302 | numericDateNumber.title = (t, claim) => `${claim} must be a number` |
| 303 | |
| 304 | test('clockTolerance num', async (t) => { |
nothing calls this directly
no test coverage detected
searching dependent graphs…