Files
Multi-Hoster-Upload/tests/settings-import-gate.test.js
T
Sucukdeluxe 76a228fb7c release: v2.0.6
Redesign the desktop workspace with task sidebars, live filters, clearer settings, and an accessible update dialog.

Harden encrypted backup imports, configuration persistence, history retention, queue snapshots, shutdown recovery, and update installation ordering.

Publish verified Windows artifacts and refreshed English documentation.
2026-08-10 09:28:28 +02:00

20 lines
673 B
JavaScript

const { describe, it } = require('node:test');
const assert = require('node:assert/strict');
describe('settings import gate', () => {
it('blocks upload starts for the complete import transition', () => {
const { createSettingsImportGate } = require('../lib/settings-import-gate');
let uploadRunning = false;
const gate = createSettingsImportGate(() => uploadRunning);
gate.begin();
assert.equal(gate.canStartUpload(), false);
assert.throws(() => gate.begin(), /bereits importiert/i);
gate.end();
assert.equal(gate.canStartUpload(), true);
uploadRunning = true;
assert.throws(() => gate.begin(), /laufender Uploads/i);
});
});