From 7d02b36092bbb4e1887abde57500e3aba13497f4 Mon Sep 17 00:00:00 2001 From: MeiMei <30769358+mei23@users.noreply.github.com> Date: Sat, 13 Mar 2021 23:22:54 +0900 Subject: [PATCH] Fix assets test and favicon type (#7344) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix * koa-faviconはimage/x-iconがデフォルトらしい * シンプルに * faviconなど --- assets/favicon.ico | Bin 0 -> 90022 bytes locales/ja-JP.yml | 2 +- src/server/web/index.ts | 2 +- test/fetch-resource.ts | 19 +++++++++++++------ test/utils.ts | 2 +- 5 files changed, 16 insertions(+), 9 deletions(-) create mode 100644 assets/favicon.ico diff --git a/assets/favicon.ico b/assets/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..9be1ff62956cd5d1e21540bee043a3c6c144d453 GIT binary patch literal 90022 zcmeHw2YeLA+5YbJrj8_flLVso-a9ysdu+!xHnAPsu>sSIB#?xJQ1A2(q8J0FOCVIJ z>H-%W*Vu6q$A9OGyNw+T^MBsGn`3pHq&t-p`M%qq9?kCF?##UJ^Ugc7yYK7@f+(m2 zZ*Kut>R_I~U?jD6$Bo3}$J3c{oQf)EvD+181|%EtsD6zAYjGeLV!BV}Ky2Rf6J+gMz@A1jT3j1(E$Kh<=`e zV&VX4pLj0K^7|)(csfzgzP3y-v3#L3&e4CkRZ!$5^j2KRhyhkAPR4aoe1B3ZN2LE> z91_G0^LvOpm#r3eER7Je=XOv>J*iXWEO}nFZ)uu(=fVk!@^$5k$_-3H+1g#I4f8ar z>TE%AF+~tlU-A%g!g7VZ5lq6aWt)t9mONlQyy8dW8!H&nPgPeo-2#||>Wy!y4z6sg zIvqPuaXPlIxNdHUus7^8VP80tuzOjB&+Fmg{wJathvuy<%!;dK;4DWP$HRI4-+r~JIS2x`Bs>r-$s>)(IKvj}^d5i;Wm` zF@C7a85fQ5b&$WWL`z_%@j5-Hvu-f zEd6_rzwBmhu5D(aI47h!n{@%&W8LRm5;Nt;G1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^XDT4>iw+vaq_qqs-(Rjqa)^93WTvVQJ*A$5~slximQNbo>KB=TnpWlw@A)aXI}&m-DG< z?F*A$_I`auKe87(7Ldz*x3+t(Yo2oXslEj63rQZ0ux&{P;Z*#Cl06ipW(h@UhlR5# zD})nkrVBfl1q(0V&#&uk<>&cQ>deB=t5KJZkBl))E>4;T22T)kR(h`8uy7rSkI{qhEPGj;uGPth?=8N92_s)138}m*ePqbJoY5cgt$Po(;5Y zjohWXHQ?5OTLW$lxHaI`fLjA@4Y)Pn)__|BZVk9K;MRa!18xntHQ?5OTLW$lxHaI` zfLjA@4Y)Pn)__|BZVk9x1MGj>Qmi#gMCs20V*-HX7NwsG<9-!{akTw2rBQ;{H-gZK zwkgFi%1<%(infdKK7AZ3MqwXqQ;KtF5ow!JoFgsR#HoV#sd2-2ZZG4c z;%ndTBvt43@AYka*&L7UPj8MHy8ydu?&e?V8OKo{D=O%VC`?o{67DUQWJ5+H9NMll2HVH0wI8 zz~M#7cfcVQ+iZU--?sHXw*Jc2-$h#dA { diff --git a/test/fetch-resource.ts b/test/fetch-resource.ts index bd3a325dc2..12a37b6cb0 100644 --- a/test/fetch-resource.ts +++ b/test/fetch-resource.ts @@ -22,6 +22,7 @@ const UNSPECIFIED = '*/*'; // Response Contet-Type const AP = 'application/activity+json; charset=utf-8'; +const JSON = 'application/json; charset=utf-8'; const HTML = 'text/html; charset=utf-8'; describe('Fetch resource', () => { @@ -50,33 +51,39 @@ describe('Fetch resource', () => { })); it('GET root', async(async () => { - const res = await simpleGet('/', 'text/html'); + const res = await simpleGet('/'); assert.strictEqual(res.status, 200); + assert.strictEqual(res.type, HTML); })); it('GET docs', async(async () => { - const res = await simpleGet('/docs/ja-JP/about', 'text/html'); + const res = await simpleGet('/docs/ja-JP/about'); assert.strictEqual(res.status, 200); + assert.strictEqual(res.type, HTML); })); it('GET api-doc', async(async () => { - const res = await simpleGet('/api-doc', 'text/html'); + const res = await simpleGet('/api-doc'); assert.strictEqual(res.status, 200); + assert.strictEqual(res.type, HTML); })); it('GET api.json', async(async () => { - const res = await simpleGet('/api.json', 'application/json'); + const res = await simpleGet('/api.json'); assert.strictEqual(res.status, 200); + assert.strictEqual(res.type, JSON); })); it('GET favicon.ico', async(async () => { - const res = await simpleGet('/favicon.ico', 'image/png'); + const res = await simpleGet('/favicon.ico'); assert.strictEqual(res.status, 200); + assert.strictEqual(res.type, 'image/x-icon'); })); it('GET apple-touch-icon.png', async(async () => { - const res = await simpleGet('/apple-touch-icon.png', 'image/png'); + const res = await simpleGet('/apple-touch-icon.png'); assert.strictEqual(res.status, 200); + assert.strictEqual(res.type, 'image/png'); })); }); diff --git a/test/utils.ts b/test/utils.ts index 55e877a8a2..b0393ee192 100644 --- a/test/utils.ts +++ b/test/utils.ts @@ -110,7 +110,7 @@ export function connectStream(user: any, channel: string, listener: (message: Re }); } -export const simpleGet = async (path: string, accept: string): Promise<{ status?: number, type?: string, location?: string }> => { +export const simpleGet = async (path: string, accept = '*/*'): Promise<{ status?: number, type?: string, location?: string }> => { // node-fetchだと3xxを取れない return await new Promise((resolve, reject) => { const req = http.request(`http://localhost:${port}${path}`, {