test(server): new test facilities (#10870)

close CLOUD-142
This commit is contained in:
forehalo
2025-03-17 10:02:12 +00:00
parent 92db9a693a
commit 9b5d12dc71
12 changed files with 311 additions and 46 deletions
@@ -13,6 +13,9 @@ import { AFFiNELogger, Runtime } from '../../base';
import { GqlModule } from '../../base/graphql';
import { AuthGuard, AuthModule } from '../../core/auth';
import { ModelsModule } from '../../models';
// for jsdoc inference
// oxlint-disable-next-line no-unused-vars
import type { createModule } from '../create-module';
import { createFactory } from '../mocks';
import { initTestingDB, TEST_LOG_LEVEL } from './utils';
@@ -48,6 +51,9 @@ class MockResolver {
}
}
/**
* @deprecated use {@link createModule} instead
*/
export async function createTestingModule(
moduleDef: TestingModuleMeatdata = {},
autoInitialize = true