Skip to content

armgit / kokon

Public Imported from GitHub
0

Edit photos by describing the change, on your own GPU. A free, open-source alternative to Nano Banana and ChatGPT image editing: photos stay on your computer, no daily limit. One installer for Windows, Mac and Linux sets up the best open model (Qwen-Image 2.1). MCP server for AI agents.

713 B
Raw Blame
import { describe, expect, it } from "vitest";
import { autoCheckEnabled, checkDue } from "./updates";

describe("update check schedule", () => {
  it("is on unless turned off", () => {
    expect(autoCheckEnabled(undefined)).toBe(true);
    expect(autoCheckEnabled({})).toBe(true);
    expect(autoCheckEnabled({ updateCheck: true })).toBe(true);
    expect(autoCheckEnabled({ updateCheck: false })).toBe(false);
  });
  it("checks at most once a day", () => {
    const now = Date.UTC(2026, 9, 10, 12);
    expect(checkDue(null, now)).toBe(true);
    expect(checkDue(NaN, now)).toBe(true);
    expect(checkDue(now - 60_000, now)).toBe(false);
    expect(checkDue(now - 25 * 3600_000, now)).toBe(true);
  });
});