Skip to content

Commit

Permalink
Merge pull request #31 from nekowasabi/add-test-for-Aider-get-buffers
Browse files Browse the repository at this point in the history
feat: AiderAddFileBufferのユニットテストを追加
  • Loading branch information
nekowasabi authored Oct 13, 2024
2 parents e17297d + 375a0bc commit ba71273
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions tests/aider_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,21 @@ test("both", "AiderSilentRun should work", async (denops) => {
await sleep(SLEEP_BEFORE_ASSERT);
await assertAiderBufferHidden(denops);
});

test("both", "AiderAddBuffers should return empty for files not under git management", async (denops) => {
await denops.cmd("AiderRun");
await sleep(SLEEP_BEFORE_ASSERT);
await denops.cmd("AiderAddBuffers");
await sleep(SLEEP_BEFORE_ASSERT);
await assertAiderBufferAlive(denops);
await assertAiderBufferString(denops, "input: /add \n");
});

test("both", "AiderAddBuffers should return /add `bufferName` if there is a buffer under git management", async (denops) => {
await denops.cmd("AiderRun");
await sleep(SLEEP_BEFORE_ASSERT);
await denops.cmd("e ./tests/aider_test.ts");
await denops.cmd("AiderAddBuffers");
await sleep(SLEEP_BEFORE_ASSERT);
await assertAiderBufferString(denops, "input: /add tests/aider_test.ts\n");
});

0 comments on commit ba71273

Please sign in to comment.