style: prettier pass
This commit is contained in:
1 parent
dcaa27db9a
commit
594592046b
8 files changed
+35
-25
No files matched your search
+6
-8
@@ -52,20 +52,18 @@ test("throws the last error after exhausting attempts", async () => {
|
||||
},
|
||||
{ maxAttempts: 3, baseDelayMs: 1 }
|
||||
),
|
||||
/boom 3$/
|
||||
);
|
||||
/boom 3$/
|
||||
);
|
||||
assert.equal(attempts, 3);
|
||||
});
|
||||
|
||||
test("4xx errors are not retried by default", async () => {
|
||||
let attempts = 0;
|
||||
await assert.rejects(
|
||||
withRetry(
|
||||
"probe.client-error",
|
||||
async () => {
|
||||
attempts += 1;
|
||||
throw new HttpLikeError(404, "not found");
|
||||
})
|
||||
withRetry("probe.client-error", async () => {
|
||||
attempts += 1;
|
||||
throw new HttpLikeError(404, "not found");
|
||||
})
|
||||
);
|
||||
assert.equal(attempts, 1);
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user