Unified · Split
| @@ -1,4 +1,5 @@ | ||
| 1 | 1 | import { describe, expect, it } from "@effect/vitest"; |
| 2 | +import { assertRight } from "@effect/vitest/utils"; | |
| 2 | 3 | import { Config, ConfigProvider, Effect } from "effect"; |
| 3 | 4 | |
| 4 | 5 | import { createEnv, Env, makeEnv } from "./index"; |
| @@ -21,11 +22,10 @@ describe("makeEnv", () => { · 16 unmodified lines | ||
| 21 | 22 | )(Effect.either(AppEnv.config)), |
| 22 | 23 | ); |
| 23 | 24 | |
| 24 | − expect(parsed._tag).toBe("Right"); | |
| 25 | − if (parsed._tag === "Right") { | |
| 26 | − expect(parsed.right.PORT).toBe(8080); | |
| 27 | − expect(parsed.right.HOST).toBe("0.0.0.0"); | |
| 28 | − } | |
| 25 | + assertRight(parsed, { | |
| 26 | + PORT: 8080, | |
| 27 | + HOST: "0.0.0.0", | |
| 28 | + }); | |
| 29 | 29 | |
| 30 | 30 | expect(AppEnv.Default).toBeDefined(); |
| 31 | 31 | }); |