Test express-rate-limit implementation #15809
Unanswered
koddi-volenday
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi all,
I have this test case to test my implementation for api rate limiting using express-rate-limit library
`import request from 'supertest';
import express, { Request, Response, NextFunction } from 'express';
import * as envdata from './models/config';
import { rateLimiter } from './utils';
const { RATE_LIMITER_WINDOWS_MS } = envdata.default;
const RATE_LIMITER_MAX = 3;
describe('Rate Limiting Middleware', () => {
let app: express.Application;
});
`
The first test is successful. but the second one fails. Do you know whats wrong on this test case? Thanks
Beta Was this translation helpful? Give feedback.
All reactions