remove debounce in favor of solid-primitive

This commit is contained in:
Chris Kruining 2025-01-08 11:31:16 +01:00
parent caa35c92e9
commit 7e5af28ac2
No known key found for this signature in database
GPG key ID: EB894A3560CCCAD2
7 changed files with 6 additions and 49 deletions

View file

@ -72,40 +72,6 @@ describe('utilities', () => {
});
});
describe('debounce', () => {
const { tick } = useFakeTimers();
it('should run the given callback after the provided time', async () => {
// Arrange
const callback = mock(() => { });
const delay = 1000;
const debounced = debounce(callback, delay);
// Act
debounced();
tick(delay);
// Assert
expect(callback).toHaveBeenCalledTimes(1);
});
it('should reset if another call is made', async () => {
// Arrange
const callback = mock(() => { });
const delay = 1000;
const debounced = debounce(callback, delay);
// Act
debounced();
tick(delay / 2);
debounced();
tick(delay);
// Assert
expect(callback).toHaveBeenCalledTimes(1);
});
});
describe('deepCopy', () => {
it('can skip values passed by reference (non-objects, null, and undefined)', async () => {
// arrange