Skip to content

Commit

Permalink
Added the it( ) body
Browse files Browse the repository at this point in the history
  • Loading branch information
sanyamdogra committed Jan 27, 2020
1 parent cca0e65 commit f6287c4
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions test/express-rate-limit-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,28 @@ describe("express-rate-limit node module", function() {
);
});

it("should send correct ratelimit-limit and ratelimit-remaining", function(done) {
createAppWith(
rateLimit({ windowMs: 59100, draft_polli_ratelimit_headers: true })
);
goodRequest(
done,
function(/* err, res */) {
delay = Date.now() - start;
if (delay > 99) {
done(new Error("First request took too long: " + delay + "ms"));
} else {
done();
}
},
undefined,
true,
"5",
"4",
"60"
);
});

it("should refuse additional connections once IP has reached the max", function(done) {
createAppWith(
rateLimit({
Expand Down

0 comments on commit f6287c4

Please sign in to comment.