We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b90b5a1 commit 106a3e5Copy full SHA for 106a3e5
test/basic.test.ts
@@ -49,17 +49,16 @@ describe("shield", async () => {
49
});
50
51
it("respond to the 2nd api call when more then limit.duration time passes", async () => {
52
+ // here we should wait for the 3 sec ban to expire
53
+ await new Promise((resolve) => setTimeout(resolve, (nuxtConfigBan + 1) * 1000));
54
+
55
// see #13
56
// req.count = 1
57
let response = await $fetch("/api/example?c=2/1", {
58
method: "GET",
59
retryStatusCodes: [],
60
61
- await new Promise((resolve) =>
- setTimeout(resolve, (nuxtConfigDuration + 1) * 1000)
- );
62
-
63
// req.count = 2
64
response = await $fetch("/api/example?c=2/2", {
65
0 commit comments