mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-13 21:05:19 +00:00
refactor(server): use feature model (#9932)
This commit is contained in:
@@ -1,20 +1,23 @@
|
||||
import type { INestApplication } from '@nestjs/common';
|
||||
import test from 'ava';
|
||||
import request from 'supertest';
|
||||
|
||||
import { AppModule } from '../app.module';
|
||||
import { createTestingApp, currentUser, signUp } from './utils';
|
||||
import { createTestingApp, currentUser, signUp, TestingApp } from './utils';
|
||||
|
||||
let app: INestApplication;
|
||||
let app: TestingApp;
|
||||
|
||||
test.beforeEach(async () => {
|
||||
test.before(async () => {
|
||||
const { app: testApp } = await createTestingApp({
|
||||
imports: [AppModule],
|
||||
});
|
||||
app = testApp;
|
||||
});
|
||||
|
||||
test.afterEach.always(async () => {
|
||||
test.beforeEach(async () => {
|
||||
await app.initTestingDB();
|
||||
});
|
||||
|
||||
test.after.always(async () => {
|
||||
await app.close();
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user