Skip to content

Commit 22a5f88

Browse files
committed
added in comments on later work to do in file and additional property expect lines
1 parent c0e470f commit 22a5f88

File tree

1 file changed

+16
-8
lines changed

1 file changed

+16
-8
lines changed

src/backend/__tests__/tree.test.ts

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,29 +3,37 @@ import { networkInterfaces } from 'os';
33

44
describe('Tree unit test', () => {
55
describe('Constructor', () => {
6-
let newTree = new Tree({});
6+
const newTree = new Tree({});
77

88
it('should be able to create a newTree', () => {
99
expect(newTree.state).toEqual({});
10-
})
10+
});
1111

12-
it('should have 5 properties', () => {
12+
it('should have 8 properties', () => {
1313
expect(newTree).toHaveProperty('state');
1414
expect(newTree).toHaveProperty('name');
1515
expect(newTree).toHaveProperty('componentData');
1616
expect(newTree).toHaveProperty('children');
1717
expect(newTree).toHaveProperty('parent');
18-
})
18+
expect(newTree).toHaveProperty('isExpanded');
19+
expect(newTree).toHaveProperty('rtid');
20+
expect(newTree).toHaveProperty('route');
21+
});
1922

2023
it('has name default value as stateless', () => {
2124
expect(newTree.name).toBe('nameless');
22-
})
25+
});
2326

2427
it('has children as an empty array', () => {
2528
expect(newTree.children).toEqual([]);
26-
})
27-
})
28-
29+
});
30+
});
31+
32+
/**
33+
*
34+
* the tree should have initial values of state, name, etc to be default as per newly created tree
35+
*
36+
*/
2937

3038
describe('Adding children', () => {
3139
let newTree = new Tree({});

0 commit comments

Comments
 (0)