Commit 765cca93 authored by lauraMon's avatar lauraMon

Replaces underscore with lodash in ds

parent 3cf78b50
import _ from 'underscore';
import { memoize, throttle } from 'lodash';
import $ from 'jquery';
class DirtySubmitForm {
......@@ -21,8 +21,8 @@ class DirtySubmitForm {
}
registerListeners() {
const getThrottledHandlerForInput = _.memoize(() =>
_.throttle(event => this.updateDirtyInput(event), DirtySubmitForm.THROTTLE_DURATION),
const getThrottledHandlerForInput = memoize(() =>
throttle(event => this.updateDirtyInput(event), DirtySubmitForm.THROTTLE_DURATION),
);
const throttledUpdateDirtyInput = event => {
......
......@@ -70,6 +70,7 @@ describe('DirtySubmitForm', () => {
describe('throttling tests', () => {
beforeEach(() => {
jasmine.clock().install();
jasmine.clock().mockDate();
DirtySubmitForm.THROTTLE_DURATION = 100;
});
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment