Skip to content

Commit 6974e26

Browse files
committed
Make network dependent tests skip on remote 503s as well
1 parent 4cefa6b commit 6974e26

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

test/test-utils.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,10 @@ export async function ignoreNetworkError<T extends RequestPromise | Promise<Resp
132132
}
133133
});
134134

135-
if ((result as any).status === 502) {
136-
console.warn('Skipping test due to remote 502 response');
135+
const status = (result as any).status;
136+
137+
if (status === 502 || status === 503) {
138+
console.warn(`Skipping test due to remote ${status} response`);
137139
throw options.context.skip();
138140
}
139141

0 commit comments

Comments
 (0)