Skip to content

Commit 8effcf3

Browse files
Provide NodeServices layer in wsServer bootstrap test
- inject `NodeServices.layer` into sqlite persistence setup in `wsServer.test.ts` - fixes test runtime dependencies for existing-state bootstrap path
1 parent 9e8363c commit 8effcf3

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎apps/server/src/wsServer.test.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import fs from "node:fs";
33
import os from "node:os";
44
import path from "node:path";
55

6+
import * as NodeServices from "@effect/platform-node/NodeServices";
67
import { Effect, Exit, Layer, PubSub, Scope, Stream } from "effect";
78
import { describe, expect, it, afterEach, vi } from "vitest";
89
import { createServer } from "./wsServer";
@@ -510,7 +511,7 @@ describe("WebSocket Server", () => {
510511
const stateDir = makeTempDir("t3code-state-bootstrap-existing-");
511512
const persistenceLayer = makeSqlitePersistenceLive(
512513
path.join(stateDir, "state.sqlite"),
513-
) as unknown as Layer.Layer<SqlClient.SqlClient, never>;
514+
).pipe(Layer.provide(NodeServices.layer)) as unknown as Layer.Layer<SqlClient.SqlClient, never>;
514515
const cwd = "/test/bootstrap-existing";
515516

516517
server = await createTestServer({

0 commit comments

Comments
 (0)