Revert "feat: Adds support for draft in conversation reply box (#4205)" (#4425)

This reverts commit 5ea0436051.
This commit is contained in:
Pranav Raj S
2022-04-08 15:52:39 +05:30
committed by GitHub
parent 7e5ec7925c
commit bc7bcc20b8
10 changed files with 24 additions and 202 deletions
@@ -1,32 +0,0 @@
import { debounce } from '../TimeHelpers';
// Tell Jest to mock all timeout functions
jest.useFakeTimers('modern');
describe('debounce', () => {
test('execute just once with immediate false', () => {
let func = jest.fn();
let debouncedFunc = debounce(func, 1000);
for (let i = 0; i < 100; i += 1) {
debouncedFunc();
}
// Fast-forward time
jest.runAllTimers();
expect(func).toBeCalledTimes(1);
});
test('execute just once with immediate true', () => {
let func = jest.fn();
let debouncedFunc = debounce(func, 1000, true);
for (let i = 0; i < 100; i += 1) {
debouncedFunc();
}
jest.runAllTimers();
expect(func).toBeCalledTimes(1);
});
});