refactor: remove core-realtime from main (scaffoldable via gen core-package realtime)
This commit is contained in:
@@ -1,8 +1,7 @@
|
||||
import "reflect-metadata";
|
||||
import { afterEach, beforeEach, describe, expect, it } from "vitest";
|
||||
import { NoopTracer, NoopLogger } from "@repo/core-shared/instrumentation";
|
||||
import { RecordingEventBus, RecordingJobQueue, RecordingRealtimeBroadcaster } from "@repo/core-testing/instrumentation";
|
||||
import { RealtimeHandlerRegistry } from "@repo/core-realtime";
|
||||
import { RecordingEventBus, RecordingJobQueue } from "@repo/core-testing/instrumentation";
|
||||
import { bindDevSeedAuth } from "@/di/bind-dev-seed";
|
||||
import { authContainer } from "@/di/container";
|
||||
import { AUTH_SYMBOLS } from "@/di/symbols";
|
||||
@@ -33,7 +32,7 @@ describe("bindDevSeedAuth", () => {
|
||||
});
|
||||
|
||||
it("populates the repository with the dev users", async () => {
|
||||
await bindDevSeedAuth({ ...noop, bus: new RecordingEventBus(), queue: new RecordingJobQueue(), realtime: new RecordingRealtimeBroadcaster(), realtimeRegistry: new RealtimeHandlerRegistry() });
|
||||
await bindDevSeedAuth({ ...noop, bus: new RecordingEventBus(), queue: new RecordingJobQueue() });
|
||||
|
||||
const repo = authContainer.get<IUsersRepository>(
|
||||
AUTH_SYMBOLS.IUsersRepository,
|
||||
@@ -46,7 +45,7 @@ describe("bindDevSeedAuth", () => {
|
||||
});
|
||||
|
||||
it("seeds alice reachable by username", async () => {
|
||||
await bindDevSeedAuth({ ...noop, bus: new RecordingEventBus(), queue: new RecordingJobQueue(), realtime: new RecordingRealtimeBroadcaster(), realtimeRegistry: new RealtimeHandlerRegistry() });
|
||||
await bindDevSeedAuth({ ...noop, bus: new RecordingEventBus(), queue: new RecordingJobQueue() });
|
||||
|
||||
const repo = authContainer.get<IUsersRepository>(
|
||||
AUTH_SYMBOLS.IUsersRepository,
|
||||
@@ -59,13 +58,13 @@ describe("bindDevSeedAuth", () => {
|
||||
});
|
||||
|
||||
it("is idempotent — calling twice rebuilds a fresh populated repo", async () => {
|
||||
await bindDevSeedAuth({ ...noop, bus: new RecordingEventBus(), queue: new RecordingJobQueue(), realtime: new RecordingRealtimeBroadcaster(), realtimeRegistry: new RealtimeHandlerRegistry() });
|
||||
await bindDevSeedAuth({ ...noop, bus: new RecordingEventBus(), queue: new RecordingJobQueue() });
|
||||
const before = authContainer.get<IUsersRepository>(
|
||||
AUTH_SYMBOLS.IUsersRepository,
|
||||
);
|
||||
const beforeAlice = await before.getUserByUsername("alice");
|
||||
|
||||
await bindDevSeedAuth({ ...noop, bus: new RecordingEventBus(), queue: new RecordingJobQueue(), realtime: new RecordingRealtimeBroadcaster(), realtimeRegistry: new RealtimeHandlerRegistry() });
|
||||
await bindDevSeedAuth({ ...noop, bus: new RecordingEventBus(), queue: new RecordingJobQueue() });
|
||||
const after = authContainer.get<IUsersRepository>(
|
||||
AUTH_SYMBOLS.IUsersRepository,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user