feat: update throttler (#7957)

This commit is contained in:
darkskygit
2024-08-23 13:52:47 +00:00
parent 49c8a25fce
commit 0b3c7d1407
4 changed files with 31 additions and 26 deletions

View File

@@ -137,6 +137,8 @@ test('should be able to prevent requests if limit is reached', async t => {
const stub = Sinon.stub(app.get(ThrottlerStorage), 'increment').resolves({
timeToExpire: 10,
totalHits: 21,
isBlocked: true,
timeToBlockExpire: 10,
});
const res = await request(app.getHttpServer())
.get('/nonthrottled/strict')