From 6fb8bf05bdbad21e345c67ba688c09cb09fa0112 Mon Sep 17 00:00:00 2001 From: guibwl <228474838@qq.com> Date: Thu, 28 Dec 2023 09:41:37 +0800 Subject: [PATCH] fix eslint(arca/curly) in httpUtils.test.ts --- tests/httpUtils.test.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/httpUtils.test.ts b/tests/httpUtils.test.ts index 28ff81f64..4676be3cf 100644 --- a/tests/httpUtils.test.ts +++ b/tests/httpUtils.test.ts @@ -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 => ...)