Skip to content

Dodaios is an open-source agent OS for your desktop: it runs your coding agents, browser and apps by voice or chat, on your own machine. Formerly Personal Jarvis.

657 B
Raw Blame
import { describe, it, expect, beforeEach } from "vitest";
import { useMissionDrag } from "./missionDrag";

describe("useMissionDrag", () => {
  beforeEach(() => {
    useMissionDrag.getState().end();
  });

  it("starts not dragging", () => {
    expect(useMissionDrag.getState().dragging).toBe(false);
  });

  it("begin() marks a mission drag in progress", () => {
    useMissionDrag.getState().begin();
    expect(useMissionDrag.getState().dragging).toBe(true);
  });

  it("end() clears the drag", () => {
    useMissionDrag.getState().begin();
    useMissionDrag.getState().end();
    expect(useMissionDrag.getState().dragging).toBe(false);
  });
});