enhance(backend): テストの高速化 (#12939)
* enhance(backend): テストの高速化 * add ls * 自動的にマージされるようなので不要 * 起動方法を揃える * fix test
This commit is contained in:
@@ -3,19 +3,19 @@
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
import { INestApplicationContext } from '@nestjs/common';
|
||||
|
||||
process.env.NODE_ENV = 'test';
|
||||
|
||||
import * as assert from 'assert';
|
||||
import { loadConfig } from '@/config.js';
|
||||
import { MiUser, UsersRepository } from '@/models/_.js';
|
||||
import { jobQueue } from '@/boot/common.js';
|
||||
import { secureRndstr } from '@/misc/secure-rndstr.js';
|
||||
import { uploadFile, signup, startServer, initTestDb, api, sleep, successfulApiCall } from '../utils.js';
|
||||
import type { INestApplicationContext } from '@nestjs/common';
|
||||
import { jobQueue } from '@/boot/common.js';
|
||||
import { api, initTestDb, signup, sleep, successfulApiCall, uploadFile } from '../utils.js';
|
||||
import type * as misskey from 'misskey-js';
|
||||
|
||||
describe('Account Move', () => {
|
||||
let app: INestApplicationContext;
|
||||
let jq: INestApplicationContext;
|
||||
let url: URL;
|
||||
|
||||
@@ -30,8 +30,8 @@ describe('Account Move', () => {
|
||||
let Users: UsersRepository;
|
||||
|
||||
beforeAll(async () => {
|
||||
app = await startServer();
|
||||
jq = await jobQueue();
|
||||
|
||||
const config = loadConfig();
|
||||
url = new URL(config.url);
|
||||
const connection = await initTestDb(false);
|
||||
@@ -46,7 +46,7 @@ describe('Account Move', () => {
|
||||
}, 1000 * 60 * 2);
|
||||
|
||||
afterAll(async () => {
|
||||
await Promise.all([app.close(), jq.close()]);
|
||||
await jq.close();
|
||||
});
|
||||
|
||||
describe('Create Alias', () => {
|
||||
|
Reference in New Issue
Block a user