summaryrefslogtreecommitdiff
path: root/packages/backend/test/e2e/clips.ts
diff options
context:
space:
mode:
authorおさむのひと <46447427+samunohito@users.noreply.github.com>2024-01-08 17:43:52 +0900
committerGitHub <noreply@github.com>2024-01-08 17:43:52 +0900
commit35ec41fc1eddd7ebf5552e6f0bceebfbfa077a21 (patch)
treed3bb804799399798c5c8d1d4654932c2d25d868e /packages/backend/test/e2e/clips.ts
parentfix(backend): `drive/files/update`におけるファイル名のバリデー... (diff)
downloadsharkey-35ec41fc1eddd7ebf5552e6f0bceebfbfa077a21.tar.gz
sharkey-35ec41fc1eddd7ebf5552e6f0bceebfbfa077a21.tar.bz2
sharkey-35ec41fc1eddd7ebf5552e6f0bceebfbfa077a21.zip
enhance(backend): テストの高速化 (#12939)
* enhance(backend): テストの高速化 * add ls * 自動的にマージされるようなので不要 * 起動方法を揃える * fix test
Diffstat (limited to 'packages/backend/test/e2e/clips.ts')
-rw-r--r--packages/backend/test/e2e/clips.ts19
1 files changed, 1 insertions, 18 deletions
diff --git a/packages/backend/test/e2e/clips.ts b/packages/backend/test/e2e/clips.ts
index 49092fba63..b679eea8cf 100644
--- a/packages/backend/test/e2e/clips.ts
+++ b/packages/backend/test/e2e/clips.ts
@@ -18,25 +18,13 @@ import { paramDef as UnfavoriteParamDef } from '@/server/api/endpoints/clips/unf
import { paramDef as AddNoteParamDef } from '@/server/api/endpoints/clips/add-note.js';
import { paramDef as RemoveNoteParamDef } from '@/server/api/endpoints/clips/remove-note.js';
import { paramDef as NotesParamDef } from '@/server/api/endpoints/clips/notes.js';
-import {
- signup,
- post,
- startServer,
- api,
- successfulApiCall,
- failedApiCall,
- ApiRequest,
- hiddenNote,
-} from '../utils.js';
-import type { INestApplicationContext } from '@nestjs/common';
+import { api, ApiRequest, failedApiCall, hiddenNote, post, signup, successfulApiCall } from '../utils.js';
describe('クリップ', () => {
type User = Packed<'User'>;
type Note = Packed<'Note'>;
type Clip = Packed<'Clip'>;
- let app: INestApplicationContext;
-
let alice: User;
let bob: User;
let aliceNote: Note;
@@ -145,7 +133,6 @@ describe('クリップ', () => {
};
beforeAll(async () => {
- app = await startServer();
alice = await signup({ username: 'alice' });
bob = await signup({ username: 'bob' });
@@ -160,10 +147,6 @@ describe('クリップ', () => {
bobSpecifiedNote = await post(bob, { text: 'specified only', visibility: 'specified' }) as any;
}, 1000 * 60 * 2);
- afterAll(async () => {
- await app.close();
- });
-
afterEach(async () => {
// テスト間で影響し合わないように毎回全部消す。
for (const user of [alice, bob]) {