/**
 * EU-LP Security Features Tests
 */

import { describe, it, expect } from 'vitest';
import { validateSecurityFeatures } from './security-features';

describe('Security Features Validation', () => {
  describe('validateSecurityFeatures', () => {
    it('should validate UV/IR detection', async () => {
      const documentImage = Buffer.from('test-document-image');

      const result = await validateSecurityFeatures(documentImage);

      expect(result.uvDetection).toBeDefined();
      expect(result.irDetection).toBeDefined();
    });

    it('should validate watermark', async () => {
      const documentImage = Buffer.from('test-document-image');

      const result = await validateSecurityFeatures(documentImage);

      expect(result.watermark).toBeDefined();
      expect(result.watermarkValid).toBeDefined();
    });

    it('should validate OVI', async () => {
      const documentImage = Buffer.from('test-document-image');

      const result = await validateSecurityFeatures(documentImage);

      expect(result.ovi).toBeDefined();
      expect(result.oviValid).toBeDefined();
    });

    it('should validate intaglio printing', async () => {
      const documentImage = Buffer.from('test-document-image');

      const result = await validateSecurityFeatures(documentImage);

      expect(result.intaglioPrinting).toBeDefined();
      expect(result.intaglioValid).toBeDefined();
    });

    it('should return overall validation result', async () => {
      const documentImage = Buffer.from('test-document-image');

      const result = await validateSecurityFeatures(documentImage);

      expect(result.valid).toBeDefined();
      expect(result.errors).toBeDefined();
      expect(result.warnings).toBeDefined();
    });
  });
});

