test(server): utils (#10028)

This commit is contained in:
forehalo
2025-02-10 06:35:11 +00:00
parent 8f6b512cfd
commit c3f5b4abb4
40 changed files with 1577 additions and 2222 deletions

View File

@@ -17,7 +17,7 @@ const test = ava as TestFn<{
}>;
test.before(async t => {
const { app } = await createTestingApp({
const app = await createTestingApp({
imports: [ConfigModule.forRoot(), AppModule],
});

View File

@@ -20,7 +20,7 @@ const test = ava as TestFn<{
}>;
test.before(async t => {
const { app } = await createTestingApp({
const app = await createTestingApp({
imports: [
ConfigModule.forRoot({
flavor: {
@@ -44,7 +44,7 @@ let user: User;
let workspace: Workspace;
test.beforeEach(async t => {
t.context.config.docService.endpoint = t.context.app.getHttpServerUrl();
t.context.config.docService.endpoint = t.context.app.url();
await t.context.app.initTestingDB();
user = await t.context.models.user.create({
email: 'test@affine.pro',