Skip to content

Commit

Permalink
fix eslint(arca/curly) in httpUtils.test.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
guibwl authored Dec 28, 2023
1 parent dda29e2 commit 6fb8bf0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/httpUtils.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ describe(`http utils fetchUrlStream`, () => {
if ([301, 302, 307, 308].includes(+statusCode)) {
const redirectCode = parsedURL.searchParams.get(`redirectCode`)!;
// mock response.headers.location
if (redirectCode) Reflect.set(response, `headers`, {location: getUrl(redirectCode)});
if (redirectCode) {
Reflect.set(response, `headers`, {location: getUrl(redirectCode)});
}
}

// handle request.on('error', err => ...)
Expand Down

0 comments on commit 6fb8bf0

Please sign in to comment.