fix test on redis

This commit is contained in:
Barış Soner Uşaklı
2022-08-09 18:26:46 -04:00
parent 659cfe853d
commit 961be70725

View File

@@ -688,6 +688,8 @@ describe('socket.io', () => {
const uid = await user.create({ username: 'forceme', password: '123345' });
await socketAdmin.user.forcePasswordReset({ uid: adminUid }, [uid]);
const pwExpiry = await user.getUserField(uid, 'passwordExpiry');
const sleep = util.promisify(setTimeout);
await sleep(500);
assert(pwExpiry > then && pwExpiry < Date.now());
});