- Added a FileSystemInitializationError.

- Changed the static init method to check basic schema (root format and existence) before returning.

- Added getRoot method that throws generic Error if inode 0 doesnt resolve.
This commit is contained in:
2026-07-22 14:28:50 +02:00
parent 2affb3ceb2
commit 0a477855c7
4 changed files with 64 additions and 16 deletions
-2
View File
@@ -86,8 +86,6 @@ describe("createNode", () => {
expect(newFS).toBeInstanceOf(FileSystem);
const newNode = newFS.getNode(5) as FileNode;
console.log(newNode);
expect(newNode.type).toBe(TreeNodeType.File);
expect(newNode.name).toBe("readme");
expect(new TextDecoder().decode(newNode.content.toArray())).toBe("Lorem ipsum");