chore: generate
This commit is contained in:
@@ -110,7 +110,9 @@ describe("Config", () => {
|
||||
const config = yield* Config.Service
|
||||
const entries = yield* config.entries()
|
||||
|
||||
expect(entries).toEqual([new Config.Directory({ type: "directory", path: AbsolutePath.make(path.join(tmp.path, "global")) })])
|
||||
expect(entries).toEqual([
|
||||
new Config.Directory({ type: "directory", path: AbsolutePath.make(path.join(tmp.path, "global")) }),
|
||||
])
|
||||
}).pipe(Effect.provide(testLayer(tmp.path))),
|
||||
),
|
||||
),
|
||||
@@ -157,11 +159,11 @@ describe("Config", () => {
|
||||
yield* Effect.promise(() =>
|
||||
fs.writeFile(path.join(tmp.path, "opencode.jsonc"), JSON.stringify({ $schema: "changed" })),
|
||||
)
|
||||
expect((yield* config.entries()).filter((entry) => entry.type === "document").map((document) => document.info.$schema)).toEqual([
|
||||
"base",
|
||||
"middle",
|
||||
"last",
|
||||
])
|
||||
expect(
|
||||
(yield* config.entries())
|
||||
.filter((entry) => entry.type === "document")
|
||||
.map((document) => document.info.$schema),
|
||||
).toEqual(["base", "middle", "last"])
|
||||
}).pipe(Effect.provide(testLayer(tmp.path)))
|
||||
}),
|
||||
),
|
||||
|
||||
@@ -57,11 +57,13 @@ describe("ConfigSkillPlugin.Plugin", () => {
|
||||
|
||||
expect(sources).toEqual([
|
||||
new SkillV2.DirectorySource({ type: "directory", path: AbsolutePath.make(path.join(directory, "skills")) }),
|
||||
new SkillV2.DirectorySource({ type: "directory", path: AbsolutePath.make(path.join("/home/test", "shared-skills")) }),
|
||||
new SkillV2.DirectorySource({
|
||||
type: "directory",
|
||||
path: AbsolutePath.make(path.join("/home/test", "shared-skills")),
|
||||
}),
|
||||
new SkillV2.DirectorySource({ type: "directory", path: AbsolutePath.make("/opt/skills") }),
|
||||
new SkillV2.UrlSource({ type: "url", url: "https://example.test/skills/" }),
|
||||
])
|
||||
}),
|
||||
)
|
||||
|
||||
})
|
||||
|
||||
@@ -254,10 +254,7 @@ function testLayer(input: {
|
||||
),
|
||||
),
|
||||
),
|
||||
Layer.succeed(
|
||||
Config.Service,
|
||||
Config.Service.of({ entries: () => Effect.succeed(input.documents) }),
|
||||
),
|
||||
Layer.succeed(Config.Service, Config.Service.of({ entries: () => Effect.succeed(input.documents) })),
|
||||
Layer.succeed(RepositoryCache.Service, RepositoryCache.Service.of({ ensure: input.ensure })),
|
||||
),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user