refactor(server): use feature model (#9932)

This commit is contained in:
forehalo
2025-02-05 10:27:26 +00:00
parent 0ff8d3af6f
commit 7826e2b7c8
121 changed files with 1723 additions and 3826 deletions

View File

@@ -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();
});