mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-07-25 23:44:57 +02:00
fix(backend): setup.e2e.ts の beforeAll でdispose前にschema dropが走る順序バグを修正 (Phase 6) (tiramiss-community/endolphin#52) Co-authored-by: おさむのひと <46447427+samunohito@users.noreply.github.com>
16 lines
645 B
TypeScript
16 lines
645 B
TypeScript
/*
|
|
* SPDX-FileCopyrightText: syuilo and misskey-project
|
|
* SPDX-License-Identifier: AGPL-3.0-only
|
|
*/
|
|
|
|
import { beforeAll } from 'vitest';
|
|
import { initTestDb, sendEnvResetRequest } from './utils.js';
|
|
|
|
beforeAll(async () => {
|
|
// 前ファイルのNestJSアプリをdispose(env-reset)した後にスキーマをdrop & 再作成する。
|
|
// 逆順だと、前ファイルの最後のテストが投げっぱなしにした非同期処理(cacheServiceのrefresh等)が
|
|
// dispose前のdrop中に発火し、Unhandled Rejection (relation does not exist) でクラッシュしうる。
|
|
await sendEnvResetRequest();
|
|
await initTestDb(false);
|
|
});
|