Release branch for 4.0.0.
This commit is contained in:
jubnl
2026-08-27 13:22:39 +02:00
committed by GitHub
parent e60427f813
commit 77dddd5e8a
3355 changed files with 403744 additions and 67215 deletions
@@ -12,9 +12,11 @@ const { pluginsEnabled, getMock } = vi.hoisted(() => ({
}));
vi.mock('../../../src/nest/plugins/kill-switch', () => ({ pluginsEnabled }));
vi.mock('../../../src/db/database', () => ({ db: { prepare: () => ({ get: getMock }) } }));
import { db as dbConn } from '../../../src/db/database';
import { DatabaseService } from '../../../src/nest/database/database.service';
import { PluginOAuthController } from '../../../src/nest/plugins/plugin-oauth.controller';
import type { PluginOAuthService } from '../../../src/nest/plugins/plugin-oauth.service';
import { PluginOAuthController } from '../../../src/nest/plugins/oauth/plugin-oauth.controller';
import type { PluginOAuthService } from '../../../src/nest/plugins/oauth/plugin-oauth.service';
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const req = (id?: number) => ({ user: id === undefined ? undefined : { id } }) as any;
@@ -30,7 +32,7 @@ function ctrl(over: Partial<PluginOAuthService> = {}) {
disconnect: vi.fn(),
...over,
} as unknown as PluginOAuthService;
return { c: new PluginOAuthController(svc), svc };
return { c: new PluginOAuthController(svc, new DatabaseService(dbConn)), svc };
}
describe('PluginOAuthController', () => {