| ... | @@ -14,22 +14,6 @@ const TestLayer = VcsProjectConfig.layer.pipe( | ... | @@ -14,22 +14,6 @@ const TestLayer = VcsProjectConfig.layer.pipe( |
| 14 | ); | 14 | ); |
| 15 | | 15 | |
| 16 | describe("VcsProjectConfig", () => { | 16 | describe("VcsProjectConfig", () => { |
| 17 | it("keeps operation context and the original cause on config errors", () => { | | |
| 18 | const cause = new Error("permission denied"); | | |
| 19 | const error = new VcsProjectConfig.VcsProjectConfigError({ | | |
| 20 | operation: "read", | | |
| 21 | cwd: "/repo/packages/app", | | |
| 22 | configPath: "/repo/.t3code/vcs.json", | | |
| 23 | cause, | | |
| 24 | }); | | |
| 25 | | | |
| 26 | assert.equal(error.operation, "read"); | | |
| 27 | assert.equal(error.cwd, "/repo/packages/app"); | | |
| 28 | assert.equal(error.configPath, "/repo/.t3code/vcs.json"); | | |
| 29 | assert.strictEqual(error.cause, cause); | | |
| 30 | assert.equal(error.message, "Failed to read VCS project config at /repo/.t3code/vcs.json."); | | |
| 31 | }); | | |
| 32 | | | |
| 33 | it.layer(TestLayer)("uses an explicit requested VCS kind before config", (it) => { | 17 | it.layer(TestLayer)("uses an explicit requested VCS kind before config", (it) => { |
| 34 | it.effect("returns the requested kind", () => | 18 | it.effect("returns the requested kind", () => |
| 35 | Effect.gen(function* () { | 19 | Effect.gen(function* () { |