feat(notifications): add settings and migration

This commit is contained in:
Sucukdeluxe
2026-08-22 03:44:11 +02:00
parent 6a8a3828b8
commit 754231d15c
9 changed files with 140 additions and 18 deletions
+12
View File
@@ -40,6 +40,18 @@ const ACCOUNT_FIXTURES: Array<{
];
describe("renderer state serialization", () => {
it("projects notification controls with their safe defaults", () => {
expect(createRendererState(defaultSettings()).settings).toEqual(expect.objectContaining({
notifyPackageSuccessMode: "digest",
notifyOnRemainingBelow: false,
notifyRemainingThresholdGb: 50,
notifyOnDownloadStall: false,
notifyStallAfterSeconds: 90,
notifyStallCooldownMinutes: 10,
notifyOnDownloadRecovery: true
}));
});
it("projects distinct Real-Debrid API and Web rows with per-account state", () => {
const firstToken = "fixture-renderer-rd-first-1aB2";
const secondToken = "fixture-renderer-rd-second-3cD4";