Skip to content

Commit

Permalink
test: fix test case
Browse files Browse the repository at this point in the history
  • Loading branch information
roggervalf committed Nov 10, 2024
1 parent bcae315 commit 86673d2
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions test/RateLimiterRedis.ioredis.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,13 +161,16 @@ describe('RateLimiterRedis with fixed window', function RateLimiterRedisTest() {
points: 1,
duration: 5
});
try {
rateLimiter

rateLimiter
.consume(testKey, 1.1)
} catch (error) {
expect(error.message).to.equal('Consuming decimal number of points is not supported by this package');
done();
}
.then(() => {
done(new Error('must not'));
})
.catch((err) => {
expect(err.message).to.equal('Consuming decimal number of points is not supported by this package')
done();
});
});
});

Expand Down

0 comments on commit 86673d2

Please sign in to comment.