summaryrefslogtreecommitdiff
path: root/packages/backend/test/e2e/fetch-resource.ts
diff options
context:
space:
mode:
authorsyuilo <4439005+syuilo@users.noreply.github.com>2025-02-15 10:24:22 +0900
committerGitHub <noreply@github.com>2025-02-15 10:24:22 +0900
commitffd8cf07e683eae95858d89fa9e5d85bf271c4d6 (patch)
tree8bfb9ce0377ff711d60460ed8676f830c3a570ee /packages/backend/test/e2e/fetch-resource.ts
parentfix(frontend): Play の再読込時に UI が以前の状態を引き継い... (diff)
downloadsharkey-ffd8cf07e683eae95858d89fa9e5d85bf271c4d6.tar.gz
sharkey-ffd8cf07e683eae95858d89fa9e5d85bf271c4d6.tar.bz2
sharkey-ffd8cf07e683eae95858d89fa9e5d85bf271c4d6.zip
update deps (#15311)
* wip * bump misskey-dev/eslint-plugin * lint fixes (backend) * lint fixes (frontend) * lint fixes (frontend-embed) * rollback nsfwjs to 4.2.0 ref: infinitered/nsfwjs#904 * rollback openapi-typescript to v6 v7でOpenAPIのバリデーションが入るようになった関係でスコープ外での変更が避けられないため一時的に戻した * lint fixes (misskey-js) * temporarily disable errored lint rule (frontend-shared) * fix lint * temporarily ignore errored file for lint (frontend-shared) * rollback simplewebauthn/server to 12.0.0 v13 contains breaking changes that require some decision making * lint fixes (frontend-shared) * build misskey-js with types * fix(backend): migrate simplewebauthn/server to v12 * fix(misskey-js/autogen): ignore indent rules to generate consistent output * attempt to fix test changes due to capricorn86/happy-dom#1617 (XMLSerializer now produces valid XML) * attempt to fix test changes due to capricorn86/happy-dom#1617 (XMLSerializer now produces valid XML) * fix test * fix test * fix test * Apply suggestions from code review Co-authored-by: anatawa12 <anatawa12@icloud.com> * bump summaly to v5.2.0 * update tabler-icons to v3.30.0-based --------- Co-authored-by: かっこかり <67428053+kakkokari-gtyih@users.noreply.github.com> Co-authored-by: anatawa12 <anatawa12@icloud.com>
Diffstat (limited to 'packages/backend/test/e2e/fetch-resource.ts')
-rw-r--r--packages/backend/test/e2e/fetch-resource.ts10
1 files changed, 5 insertions, 5 deletions
diff --git a/packages/backend/test/e2e/fetch-resource.ts b/packages/backend/test/e2e/fetch-resource.ts
index 8ea4cb9800..b85cebf724 100644
--- a/packages/backend/test/e2e/fetch-resource.ts
+++ b/packages/backend/test/e2e/fetch-resource.ts
@@ -10,13 +10,13 @@ import { channel, clip, cookie, galleryPost, page, play, post, signup, simpleGet
import type { SimpleGetResponse } from '../utils.js';
import type * as misskey from 'misskey-js';
-// Request Accept
+// Request Accept in lowercase
const ONLY_AP = 'application/activity+json';
const PREFER_AP = 'application/activity+json, */*';
const PREFER_HTML = 'text/html, */*';
const UNSPECIFIED = '*/*';
-// Response Content-Type
+// Response Content-Type in lowercase
const AP = 'application/activity+json; charset=utf-8';
const HTML = 'text/html; charset=utf-8';
const JSON_UTF8 = 'application/json; charset=utf-8';
@@ -44,7 +44,8 @@ describe('Webリソース', () => {
const { path, accept, cookie, type } = param;
const res = await simpleGet(path, accept, cookie);
assert.strictEqual(res.status, 200);
- assert.strictEqual(res.type, type ?? HTML);
+ // Header values are case-insensitive
+ assert.strictEqual(res.type?.toLowerCase(), (type ?? HTML).toLowerCase());
return res;
};
@@ -95,8 +96,7 @@ describe('Webリソース', () => {
describe.each([
{ path: '/', type: HTML },
{ path: '/docs/ja-JP/about', type: HTML }, // "指定されたURLに該当するページはありませんでした。"
- // fastify-static gives charset=UTF-8 instead of utf-8 and that's okay
- { path: '/api-doc', type: 'text/html; charset=UTF-8' },
+ { path: '/api-doc', type: HTML },
{ path: '/api.json', type: JSON_UTF8 },
{ path: '/api-console', type: HTML },
{ path: '/_info_card_', type: HTML },