fixed bug in moveNode where when renaming, the old record about the renamed node would still be present in the children record of the parent

This commit is contained in:
2026-07-21 17:06:02 +02:00
parent f2d2186086
commit 2affb3ceb2
2 changed files with 50 additions and 31 deletions
+1 -1
View File
@@ -338,7 +338,7 @@ describe("moveNode", () => {
});
it("successfully renames a node", () => {
const newFS = fs.moveNode(3, 2, "foo.foo");
const nodeSour = newFS.getNode(1) as FileNode;
const nodeSour = newFS.getNode(3) as FileNode;
const nodeDest = newFS.getNode(2) as DirectoryNode;
expect(nodeSour.parent).toBe(2);