const test = require('node:test');
const assert = require('node:assert/strict');
const { isTokenRevoked, revokeToken } = require('../src/security/tokenRevocation');

test('revoked token remains invalid until expiration', () => {
  const payload = { jti: 'test-token', exp: 200 };
  revokeToken(payload);
  assert.equal(isTokenRevoked(payload, 100), true);
  assert.equal(isTokenRevoked(payload, 201), false);
});
