Resolve child archive selections to complete multipart sets, support bulk package extraction, refresh extraction passwords at execution time, and keep archive failures scoped by their full paths. Restore sortable download columns, preserve verified availability, classify package retry and extraction states, secure link copying through the preload bridge, and release cancelled provider work without stale cooldowns.
16 lines
707 B
TypeScript
16 lines
707 B
TypeScript
import { describe, expect, it } from "vitest";
|
|
import { CLIPBOARD_WRITE_MAX_BYTES, validateClipboardWriteText } from "../src/main/clipboard-write";
|
|
|
|
describe("clipboard write validation", () => {
|
|
it("accepts complete large link packages up to one MiB", () => {
|
|
const text = "x".repeat(CLIPBOARD_WRITE_MAX_BYTES);
|
|
expect(validateClipboardWriteText(text)).toBe(text);
|
|
});
|
|
|
|
it("rejects empty, non-string and oversized payloads", () => {
|
|
expect(() => validateClipboardWriteText(" \n ")).toThrow(/leer/i);
|
|
expect(() => validateClipboardWriteText(4)).toThrow(/String/i);
|
|
expect(() => validateClipboardWriteText("x".repeat(CLIPBOARD_WRITE_MAX_BYTES + 1))).toThrow(/zu groß/i);
|
|
});
|
|
});
|