import { describe, it, expect } from 'vitest';
import { ownerSealAction, decideSeal } from './seal-override.mjs';

describe('seal-override', () => {
  it('ownerSealAction → owner-seal:<hash>', () => {
    expect(ownerSealAction('abc')).toBe('owner-seal:abc');
  });
  it('decideSeal: ownerSealOpen → true даже при NO-GO', () => {
    expect(decideSeal({ verdict: { wired: true, decision: 'NO-GO' }, ownerSealOpen: true })).toBe(true);
  });
  it('decideSeal: wired GO → true', () => {
    expect(decideSeal({ verdict: { wired: true, decision: 'GO' }, ownerSealOpen: false })).toBe(true);
  });
  it('decideSeal: NO-GO без owner-seal → false', () => {
    expect(decideSeal({ verdict: { wired: true, decision: 'NO-GO' }, ownerSealOpen: false })).toBe(false);
  });
});
