mirror of
https://github.com/CommunitySolidServer/CommunitySolidServer.git
synced 2024-10-03 14:55:10 +00:00
chore: Update (ts-)jest and use modern fake timers where possible
* chore(deps): update dependency jest to v27 * chore: Update (ts-)jest and use modern fake timers where possible Co-authored-by: Renovate Bot <bot@renovateapp.com> Co-authored-by: Joachim Van Herwegen <joachimvh@gmail.com>
This commit is contained in:
@@ -46,6 +46,10 @@ describe('A WrappedExpiringReadWriteLocker', (): void => {
|
||||
expect(syncCb).toHaveBeenCalledTimes(1);
|
||||
|
||||
prom = locker.withReadLock(identifier, asyncCb);
|
||||
|
||||
// Execute promise (without triggering timeout)
|
||||
jest.advanceTimersByTime(100);
|
||||
|
||||
await expect(prom).resolves.toBe('async');
|
||||
expect(asyncCb).toHaveBeenCalledTimes(1);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user