Skip to content

Commit

Permalink
fix worker tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tim-smart committed Feb 2, 2025
1 parent 9832d0d commit 5cbbdb7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/rpc/test/RpcWorker.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import "@vitest/web-worker"

import * as BrowserWorker from "@effect/platform-browser/BrowserWorker"
import { RpcServer } from "@effect/rpc"
import * as RpcClient from "@effect/rpc/RpcClient"
import { describe } from "@effect/vitest"
import { Layer } from "effect"
Expand All @@ -11,7 +12,10 @@ import { UsersClient } from "./fixtures/schemas.js"
describe("RpcWorker", () => {
const WorkerClient = UsersClient.layer.pipe(
Layer.provide(RpcClient.layerProtocolWorker({ size: 1 })),
Layer.provide(BrowserWorker.layerPlatform(() => new Worker(new URL("./fixtures/worker.ts", import.meta.url))))
Layer.provide(BrowserWorker.layerPlatform(() => new Worker(new URL("./fixtures/worker.ts", import.meta.url)))),
Layer.merge(Layer.succeed(RpcServer.Protocol, {
supportsAck: true
} as any))
)
e2eSuite("e2e worker", WorkerClient)
})

0 comments on commit 5cbbdb7

Please sign in to comment.