summaryrefslogtreecommitdiff
path: root/packages/backend/test/e2e/fetch-resource.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/backend/test/e2e/fetch-resource.ts')
-rw-r--r--packages/backend/test/e2e/fetch-resource.ts32
1 files changed, 7 insertions, 25 deletions
diff --git a/packages/backend/test/e2e/fetch-resource.ts b/packages/backend/test/e2e/fetch-resource.ts
index b85cebf724..740295bda8 100644
--- a/packages/backend/test/e2e/fetch-resource.ts
+++ b/packages/backend/test/e2e/fetch-resource.ts
@@ -6,7 +6,7 @@
process.env.NODE_ENV = 'test';
import * as assert from 'assert';
-import { channel, clip, cookie, galleryPost, page, play, post, signup, simpleGet, uploadFile } from '../utils.js';
+import { channel, clip, galleryPost, page, play, post, signup, simpleGet, uploadFile } from '../utils.js';
import type { SimpleGetResponse } from '../utils.js';
import type * as misskey from 'misskey-js';
@@ -156,20 +156,20 @@ describe('Webリソース', () => {
describe(' has entry such ', () => {
beforeEach(() => {
- post(alice, { text: "**a**" })
+ post(alice, { text: '**a**' });
});
test('MFMを含まない。', async () => {
- const content = await simpleGet(path(alice.username), "*/*", undefined, res => res.text());
+ 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;
+ const body: string = typeof (_body) === 'object' ? JSON.stringify(_body) : _body as string;
- if (body.includes("**a**")) {
- throw new Error("MFM shouldn't be included");
+ if (body.includes('**a**')) {
+ throw new Error('MFM shouldn\'t be included');
}
});
- })
+ });
});
describe.each([{ path: '/api/foo' }])('$path', ({ path }) => {
@@ -180,24 +180,6 @@ describe('Webリソース', () => {
}));
});
- describe.each([{ path: '/queue' }])('$path', ({ path }) => {
- test('はログインしないとGETできない。', async () => await notOk({
- path,
- status: 401,
- }));
-
- test('はadminでなければGETできない。', async () => await notOk({
- path,
- cookie: cookie(bob),
- status: 403,
- }));
-
- test('はadminならGETできる。', async () => await ok({
- path,
- cookie: cookie(alice),
- }));
- });
-
describe.each([{ path: '/streaming' }])('$path', ({ path }) => {
test('はGETできない。', async () => await notOk({
path,