test(directory-agents-injector): cover async migration
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
@@ -84,6 +84,23 @@ describe("processFilePathForAgentsInjection", () => {
|
|||||||
expect(output.output).toContain(srcAgentsContent)
|
expect(output.output).toContain(srcAgentsContent)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
it("finds AGENTS.md files while walking up directories", async () => {
|
||||||
|
// given
|
||||||
|
const { findAgentsMdUp } = await import("./finder")
|
||||||
|
|
||||||
|
// when
|
||||||
|
const agentsPaths = await findAgentsMdUp({
|
||||||
|
startDir: componentsDirectory,
|
||||||
|
rootDir: testRoot,
|
||||||
|
})
|
||||||
|
|
||||||
|
// then
|
||||||
|
expect(agentsPaths).toEqual([
|
||||||
|
join(srcDirectory, "AGENTS.md"),
|
||||||
|
join(componentsDirectory, "AGENTS.md"),
|
||||||
|
])
|
||||||
|
})
|
||||||
|
|
||||||
it("skips root-level AGENTS.md", async () => {
|
it("skips root-level AGENTS.md", async () => {
|
||||||
// given
|
// given
|
||||||
rmSync(join(srcDirectory, "AGENTS.md"), { force: true })
|
rmSync(join(srcDirectory, "AGENTS.md"), { force: true })
|
||||||
|
|||||||
Reference in New Issue
Block a user