MCPcopy
hub / github.com/anomalyco/opencode / testLayer

Function testLayer

packages/core/test/config/config.test.ts:24–43  ·  view source on GitHub ↗
(
  directory: string,
  globalDirectory = path.join(directory, "global"),
  projectDirectory = directory,
  vcs?: Project.Vcs,
)

Source from the content-addressed store, hash-verified

22const it = testEffect(Layer.empty)
23
24function testLayer(
25 directory: string,
26 globalDirectory = path.join(directory, "global"),
27 projectDirectory = directory,
28 vcs?: Project.Vcs,
29) {
30 const locationLayer = Layer.succeed(
31 Location.Service,
32 Location.Service.of(
33 location(
34 { directory: AbsolutePath.make(directory) },
35 { projectDirectory: AbsolutePath.make(projectDirectory), vcs },
36 ),
37 ),
38 )
39 return AppNodeBuilder.build(LayerNode.group([Config.node, Policy.node]), [
40 [Location.node, locationLayer],
41 [Global.node, Global.layerWith({ config: globalDirectory })],
42 ])
43}
44
45const provider = {
46 api: { type: "native", settings: {} },

Callers 1

config.test.tsFile · 0.70

Calls 2

locationFunction · 0.90
makeMethod · 0.45

Tested by

no test coverage detected