Skip to content

Commit 083f915

Browse files
committed
test(backups): handle rate limit exceeded error in backup creation test
1 parent d83a71c commit 083f915

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

test/backups.test.js

+10-4
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,16 @@ test("BackupsModule", async (t) => {
1616
}
1717
});
1818

19-
await t.test("should create backup", async () => {
20-
const backup = await testApp.backups.create();
21-
assert.ok(backup.url);
22-
assert.ok(backup.key);
19+
await t.test("should create backup", async (t) => {
20+
try {
21+
const backup = await testApp.backups.create();
22+
assert.ok(backup.url);
23+
assert.ok(backup.key);
24+
} catch (err) {
25+
if (err.message.includes("Rate Limit Exceeded")) {
26+
t.skip("Rate limit exceeded");
27+
}
28+
}
2329
});
2430

2531
await t.test("should download backup", async () => {

0 commit comments

Comments
 (0)