- Old tests fixed
- Added a static Fixuture class for test mockups
This commit is contained in:
@@ -38,7 +38,10 @@ const fsTwo = buildTestFS(depth7Tree);
|
||||
describe("dnTraverseTree", () => {
|
||||
test("successfully traverses down the tree in depth-first pre-order", () => {
|
||||
const result = dnTraverseTree(fs, 0);
|
||||
expect(result, `Checking the result ${result} to be [0, 1, 2, 3]`).toEqual([0, 2, 3, 1]);
|
||||
// This got changed from [0, 2, 3, 1] to [1, 2, 3]
|
||||
// A bug in dnTraverseTree resulted in the tree traversal not respecting order of nodes, and including root.
|
||||
// Including root in results caused further problems so it was decided that results wont include the passed root node;
|
||||
expect(result, `Checking the result ${result} to be [1, 2, 3]`).toEqual([1, 2, 3]);
|
||||
});
|
||||
|
||||
test("returns empty array for a non existent root inode", () => {
|
||||
|
||||
Reference in New Issue
Block a user