summaryrefslogtreecommitdiff
path: root/packages/backend/test/e2e/fetch-resource.ts
diff options
context:
space:
mode:
authorKisaragi <48310258+KisaragiEffective@users.noreply.github.com>2024-06-22 12:51:02 +0900
committerGitHub <noreply@github.com>2024-06-22 12:51:02 +0900
commitac12ab8629f0a0172250f949a98ee1efb1d0890d (patch)
treeac9b5d8ebf4ee0db28124f72e33c84f2c525bcb0 /packages/backend/test/e2e/fetch-resource.ts
parentenhance(frontend): WidgetInstanceInfo.vue と WidgetProfile.vue のスタイ... (diff)
downloadsharkey-ac12ab8629f0a0172250f949a98ee1efb1d0890d.tar.gz
sharkey-ac12ab8629f0a0172250f949a98ee1efb1d0890d.tar.bz2
sharkey-ac12ab8629f0a0172250f949a98ee1efb1d0890d.zip
fix(backend): フィードのノートのMFMはHTMLにレンダーしてから返す (#14006)
* fix(backend): フィードのノートのMFMはHTMLにレンダーしてから返す (test wip) * chore: beforeEachを使う? * fix: プレーンテキストにフォールバックしてMFMが含まれていないか調べる方針を実装 * fix: application/jsonだとパースされるのでその作用をキャンセル * build: fix lint error * docs: update CHANGELOG.md --------- Co-authored-by: syuilo <4439005+syuilo@users.noreply.github.com>
Diffstat (limited to 'packages/backend/test/e2e/fetch-resource.ts')
-rw-r--r--packages/backend/test/e2e/fetch-resource.ts17
1 files changed, 17 insertions, 0 deletions
diff --git a/packages/backend/test/e2e/fetch-resource.ts b/packages/backend/test/e2e/fetch-resource.ts
index 4851ed14be..7efd688ec2 100644
--- a/packages/backend/test/e2e/fetch-resource.ts
+++ b/packages/backend/test/e2e/fetch-resource.ts
@@ -153,6 +153,23 @@ describe('Webリソース', () => {
path: path('nonexisting'),
status: 404,
}));
+
+ describe(' has entry such ', () => {
+ beforeEach(() => {
+ post(alice, { text: "**a**" })
+ });
+
+ test('MFMを含まない。', async () => {
+ const content = await simpleGet(path(alice.username), "*/*", undefined, res => res.text());
+ const _body: unknown = content.body;
+ // JSONフィードのときは改めて文字列化する
+ const body: string = typeof (_body) === "object" ? JSON.stringify(_body) : _body as string;
+
+ if (body.includes("**a**")) {
+ throw new Error("MFM shouldn't be included");
+ }
+ });
+ })
});
describe.each([{ path: '/api/foo' }])('$path', ({ path }) => {