add changelog and spec

This commit is contained in:
Simon Knox 2017-10-26 18:53:52 +03:00
parent 9101cce2a7
commit 1d298e4939
2 changed files with 17 additions and 0 deletions

View File

@ -0,0 +1,5 @@
---
title: improve merge request realtime polling performance
merge_request:
author:
type: fixed

View File

@ -58,6 +58,18 @@ import '~/smart_interval';
done();
}, DEFAULT_LONG_TIMEOUT);
});
it('does not increment while waiting for callback', function (done) {
const smartInterval = createDefaultSmartInterval({
callback: () => new Promise($.noop),
});
setTimeout(() => {
const oneInterval = smartInterval.cfg.startingInterval * DEFAULT_INCREMENT_FACTOR;
expect(smartInterval.getCurrentInterval()).toEqual(oneInterval);
done();
}, DEFAULT_SHORT_TIMEOUT);
});
});
describe('Public methods', function () {