Skip to content

Commit

Permalink
Prevent error on CI
Browse files Browse the repository at this point in the history
  • Loading branch information
ggazzo committed Oct 20, 2021
1 parent 0d1c8b6 commit 2ad3233
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions app/settings/server/functions/settings.tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -336,8 +336,8 @@ describe('Settings', () => {
Settings.settings = settings;
const settingsRegistry = new SettingsRegistry({ store: settings, model: Settings as any });

settings.watch('setting_callback', spy, { debounce: 10 });
settings.watchByRegex(/setting_callback/ig, spy2, { debounce: 10 });
settings.watch('setting_callback', spy, { debounce: 1 });
settings.watchByRegex(/setting_callback/ig, spy2, { debounce: 1 });

settings.initilized();
settingsRegistry.addGroup('group', function() {
Expand All @@ -349,17 +349,17 @@ describe('Settings', () => {
});

setTimeout(() => {
settings.on('*', () => setTimeout(() => {
settings.once('*', () => setTimeout(() => {
done();
}, settings.getConfig({ debounce: 10 }).debounce));
}, settings.getConfig({ debounce: 1 }).debounce * 10));

Settings.updateValueById('setting_callback', 'value3');
setTimeout(() => {
expect(spy).to.have.been.called.exactly(2);
expect(spy2).to.have.been.called.exactly(2);
expect(spy).to.have.been.called.with('value2');
expect(spy).to.have.been.called.with('value3');
}, settings.getConfig({ debounce: 10 }).debounce);
}, settings.getConfig({ debounce: 10 }).debounce);
}, settings.getConfig({ debounce: 1 }).debounce);
}, settings.getConfig({ debounce: 1 }).debounce);
});
});

0 comments on commit 2ad3233

Please sign in to comment.