import { maskSensitivePayload } from './third-party-security';

describe('third-party security helpers', () => {
  it('masks sensitive fields recursively', () => {
    const masked = maskSensitivePayload({
      uid: '10001',
      key: 'abcdef123456',
      expand: {
        pass: 'student-password',
        score: 95,
      },
    });

    expect(masked).toEqual({
      uid: '10001',
      key: 'ab****56',
      expand: {
        pass: 'st****rd',
        score: 95,
      },
    });
  });
});
