You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-07-16 00:14:34 +02:00
Chore: Apply changes from mobile plugins to lib/
and app-desktop/
(#10079)
This commit is contained in:
@ -406,4 +406,18 @@ describe('models/Setting', () => {
|
||||
expect(Setting.value('myCustom')).toBe('');
|
||||
});
|
||||
|
||||
test('should not fail Sqlite UNIQUE constraint when re-registering saved settings', async () => {
|
||||
// Re-registering a saved database setting previously caused issues with saving.
|
||||
for (let i = 0; i < 2; i++) {
|
||||
await Setting.registerSetting('myCustom', {
|
||||
public: true,
|
||||
value: `${i}`,
|
||||
type: Setting.TYPE_STRING,
|
||||
storage: SettingStorage.Database,
|
||||
});
|
||||
Setting.setValue('myCustom', 'test');
|
||||
await Setting.saveAll();
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
Reference in New Issue
Block a user