Showing the changes to apps/server/src/serverLifecycleEvents.test.ts (1 of 121 files). Show all
Unified · Split
| @@ -1,3 +1,4 @@ | ||
| 1 | +import { EnvironmentId } from "@t3tools/contracts"; | |
| 1 | 2 | import { assert, it } from "@effect/vitest"; |
| 2 | 3 | import { assertTrue } from "@effect/vitest/utils"; |
| 3 | 4 | import { Effect, Option } from "effect"; |
| @@ -9,12 +10,20 @@ it.effect( · 5 unmodified lines | ||
| 9 | 10 | () => |
| 10 | 11 | Effect.gen(function* () { |
| 11 | 12 | const lifecycleEvents = yield* ServerLifecycleEvents; |
| 13 | + const environment = { | |
| 14 | + environmentId: EnvironmentId.makeUnsafe("environment-test"), | |
| 15 | + label: "Test environment", | |
| 16 | + platform: { os: "darwin" as const, arch: "arm64" as const }, | |
| 17 | + serverVersion: "0.0.0-test", | |
| 18 | + capabilities: { repositoryIdentity: true }, | |
| 19 | + }; | |
| 12 | 20 | |
| 13 | 21 | const welcome = yield* lifecycleEvents |
| 14 | 22 | .publish({ |
| 15 | 23 | version: 1, |
| 16 | 24 | type: "welcome", |
| 17 | 25 | payload: { |
| 26 | + environment, | |
| 18 | 27 | cwd: "/tmp/project", |
| 19 | 28 | projectName: "project", |
| 20 | 29 | }, |
| @@ -29,6 +38,7 @@ it.effect( · 8 unmodified lines | ||
| 29 | 38 | type: "ready", |
| 30 | 39 | payload: { |
| 31 | 40 | at: new Date().toISOString(), |
| 41 | + environment, | |
| 32 | 42 | }, |
| 33 | 43 | }) |
| 34 | 44 | .pipe(Effect.timeoutOption("50 millis")); |