feat: 固定操作间延迟设置并更新相关文档和测试

This commit is contained in:
QLHazyCoder
2026-05-18 01:29:24 +08:00
parent 7564481868
commit e5dc675369
10 changed files with 79 additions and 152 deletions
@@ -46,7 +46,7 @@ test('operationDelayEnabled defaults to enabled and strictly normalizes values',
assert.equal(api.normalizePersistentSettingValue('operationDelayEnabled', value), true);
}
assert.equal(api.normalizePersistentSettingValue('operationDelayEnabled', true), true);
assert.equal(api.normalizePersistentSettingValue('operationDelayEnabled', false), false);
assert.equal(api.normalizePersistentSettingValue('operationDelayEnabled', false), true);
});
test('operationDelayEnabled is normalized through the background settings payload path', () => {
@@ -63,5 +63,5 @@ test('operationDelayEnabled is normalized through the background settings payloa
for (const value of [undefined, null, '', 0, 'false', true]) {
assert.equal(api.buildPersistentSettingsPayload({ operationDelayEnabled: value }, { fillDefaults: true }).operationDelayEnabled, true);
}
assert.equal(api.buildPersistentSettingsPayload({ operationDelayEnabled: false }).operationDelayEnabled, false);
assert.equal(api.buildPersistentSettingsPayload({ operationDelayEnabled: false }).operationDelayEnabled, true);
});