chore: refactor server test setup (#3976)
* chore: refactor server test setup * Close dangling redis connections instead of mocking rate limiter specific modules * Segregate pre and post env test setup * fix: remove mock file
This commit is contained in:
@@ -1,28 +0,0 @@
|
||||
export default class MockRateLimiter {
|
||||
static getRateLimiter() {
|
||||
return {
|
||||
points: 100,
|
||||
consume: jest.fn(),
|
||||
};
|
||||
}
|
||||
|
||||
static setRateLimiter() {
|
||||
//
|
||||
}
|
||||
|
||||
static hasRateLimiter() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
export const RateLimiterStrategy = new Proxy(
|
||||
{},
|
||||
{
|
||||
get() {
|
||||
return {
|
||||
duration: 60,
|
||||
requests: 10,
|
||||
};
|
||||
},
|
||||
}
|
||||
);
|
||||
Reference in New Issue
Block a user