Skip to content

armgit / avibe

Public Imported from GitHub
0

Make your computer a home for your AI partner. Avibe is the local-first Agent OS: Vibey, its built-in AI partner, works out of the box, and Claude Code, Codex & OpenCode run unchanged beside it — reach them from your browser, phone, or any chat app.

623 B
Raw Blame
import { describe, expect, it } from 'vitest';

import { shouldGuardUnload } from './windowUnload';

describe('shouldGuardUnload', () => {
  it('is false when there are no windows', () => {
    expect(shouldGuardUnload([])).toBe(false);
  });

  it('is false when every window is minimized', () => {
    expect(shouldGuardUnload([{ minimized: true }, { minimized: true }])).toBe(false);
  });

  it('is true when at least one window is not minimized', () => {
    expect(shouldGuardUnload([{ minimized: false }])).toBe(true);
    expect(shouldGuardUnload([{ minimized: true }, { minimized: false }])).toBe(true);
  });
});