History

Fix GitVcsDriver test dependency import

- Import `VcsProcess` as a namespace in the test - Update layer injection to target `VcsProcess.VcsProcess`

Julius Marminge committed 6 months ago

Commit 0b0d98c1 parent ecac3ac1 file · +3 −3Browse files

Unified · Split

apps/server/src/vcs/GitVcsDriver.test.ts+3−3
@@ -4,9 +4,9 @@ import { Effect, Layer } from "effect"; · 3 unmodified lines
4import { describe, expect } from "vitest";4import { describe, expect } from "vitest";
5 5
6import { ServerConfig } from "../config.ts";6import { ServerConfig } from "../config.ts";
7import { VcsProcess } from "./VcsProcess.ts";
8import { VcsDriver } from "./VcsDriver.ts";7import { VcsDriver } from "./VcsDriver.ts";
9import * as GitVcsDriver from "./GitVcsDriver.ts";8import * as GitVcsDriver from "./GitVcsDriver.ts";
9import * as VcsProcess from "./VcsProcess.ts";
10 10
11const splitNullSeparatedPaths = (input: string): string[] =>11const splitNullSeparatedPaths = (input: string): string[] =>
12 input12 input
@@ -36,7 +36,7 @@ it.layer(Layer.empty)("GitVcsDriver.layer", (it) => { · 23 unmodified lines
36 Layer.provideMerge(GitVcsDriverTestDependencies),36 Layer.provideMerge(GitVcsDriverTestDependencies),
37 Layer.provideMerge(NodeServices.layer),37 Layer.provideMerge(NodeServices.layer),
38 Layer.provide(38 Layer.provide(
39 Layer.succeed(VcsProcess, {39 Layer.succeed(VcsProcess.VcsProcess, {
40 run: (input) => {40 run: (input) => {
41 expect(input.command).toBe("git");41 expect(input.command).toBe("git");
42 expect(input.args).toEqual([42 expect(input.args).toEqual([
@@ -85,7 +85,7 @@ it.layer(Layer.empty)("GitVcsDriver.layer", (it) => { · 42 unmodified lines
85 Layer.provideMerge(GitVcsDriverTestDependencies),85 Layer.provideMerge(GitVcsDriverTestDependencies),
86 Layer.provideMerge(NodeServices.layer),86 Layer.provideMerge(NodeServices.layer),
87 Layer.provide(87 Layer.provide(
88 Layer.succeed(VcsProcess, {88 Layer.succeed(VcsProcess.VcsProcess, {
89 run: (input) => {89 run: (input) => {
90 expect(input.command).toBe("git");90 expect(input.command).toBe("git");
91 expect(input.args).toEqual([91 expect(input.args).toEqual([