feat(FN-2962): merge fusion/fn-2962
- Add changeset for `@runfusion/fusion` minor release introducing custom provider registration support Commits merged: - feat(FN-2962): complete Step 8 — add changeset and documentation Files changed: .changeset/register-custom-providers.md | 5 +++++ 1 file changed, 5 insertions(+) Fusion-Task-Id: FN-2962
This commit is contained in:
@@ -8546,6 +8546,40 @@ describe("Git Management endpoints", () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe("GET /git/changes", () => {
|
||||
const resetGitRepo = () => {
|
||||
const { headSha } = getSharedGitTestRepo();
|
||||
execFileSync("git", ["-C", gitRepoDir, "reset", "--hard", headSha], { stdio: "pipe" });
|
||||
execFileSync("git", ["-C", gitRepoDir, "clean", "-fd"], { stdio: "pipe" });
|
||||
};
|
||||
|
||||
beforeEach(() => {
|
||||
resetGitRepo();
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
resetGitRepo();
|
||||
});
|
||||
|
||||
it("preserves the first unstaged entry instead of misclassifying it as staged", async () => {
|
||||
const readmePath = join(gitRepoDir, "README.md");
|
||||
const original = readFileSync(readmePath, "utf-8");
|
||||
const marker = `\nchanges-first-line-${Date.now()}\n`;
|
||||
writeFileSync(readmePath, `${original}${marker}`);
|
||||
|
||||
const res = await GET(buildApp(), "/api/git/changes");
|
||||
|
||||
expect(res.status).toBe(200);
|
||||
expect(res.body).toEqual([
|
||||
{
|
||||
file: "README.md",
|
||||
status: "modified",
|
||||
staged: false,
|
||||
},
|
||||
]);
|
||||
});
|
||||
});
|
||||
|
||||
describe("GET /git/diff/file", () => {
|
||||
const resetGitRepo = () => {
|
||||
const { headSha } = getSharedGitTestRepo();
|
||||
|
||||
Reference in New Issue
Block a user