enhance(backend): テストの高速化 (#12939)
* enhance(backend): テストの高速化 * add ls * 自動的にマージされるようなので不要 * 起動方法を揃える * fix test
This commit is contained in:
parent
618e2ba1d2
commit
35ec41fc1e
45 changed files with 563 additions and 283 deletions
|
@ -7,27 +7,30 @@ process.env.NODE_ENV = 'test';
|
|||
|
||||
import * as assert from 'assert';
|
||||
import { IncomingMessage } from 'http';
|
||||
import { signup, api, startServer, successfulApiCall, failedApiCall, uploadFile, waitFire, connectStream, relativeFetch, createAppToken } from '../utils.js';
|
||||
import type { INestApplicationContext } from '@nestjs/common';
|
||||
import {
|
||||
api,
|
||||
connectStream,
|
||||
createAppToken,
|
||||
failedApiCall,
|
||||
relativeFetch,
|
||||
signup,
|
||||
successfulApiCall,
|
||||
uploadFile,
|
||||
waitFire,
|
||||
} from '../utils.js';
|
||||
import type * as misskey from 'misskey-js';
|
||||
|
||||
describe('API', () => {
|
||||
let app: INestApplicationContext;
|
||||
let alice: misskey.entities.SignupResponse;
|
||||
let bob: misskey.entities.SignupResponse;
|
||||
let carol: misskey.entities.SignupResponse;
|
||||
|
||||
beforeAll(async () => {
|
||||
app = await startServer();
|
||||
alice = await signup({ username: 'alice' });
|
||||
bob = await signup({ username: 'bob' });
|
||||
carol = await signup({ username: 'carol' });
|
||||
}, 1000 * 60 * 2);
|
||||
|
||||
afterAll(async () => {
|
||||
await app.close();
|
||||
});
|
||||
|
||||
describe('General validation', () => {
|
||||
test('wrong type', async () => {
|
||||
const res = await api('/test', {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue