// @vitest-environment happy-dom
import { describe, it, expect } from 'vitest';
import type { FileDiff, FileDiffDetail } from './types';

describe('FileDiff types', () => {
  it('FileDiff accepts binary status', () => {
    const f: FileDiff = {
      oldPath: 'a.png',
      newPath: 'a.png',
      status: 'binary',
      additions: 0,
      deletions: 0,
    };
    expect(f.status).toBe('binary');
  });

  it('FileDiffDetail extends FileDiff with hunks', () => {
    const d: FileDiffDetail = {
      oldPath: 'a.ts',
      newPath: 'a.ts',
      status: 'modified',
      additions: 5,
      deletions: 2,
      hunks: [],
    };
    expect(d.hunks).toEqual([]);
    expect(d.additions).toBe(5);
  });
});
