@@ -17,38 +17,38 @@ describe("LinkedList", () => {
17
17
expect ( linkedList . isEmpty ( ) ) . toBeTruthy ( )
18
18
} ) ;
19
19
20
- test ( "should return head node" , ( ) => {
21
- let node = new Node ( ) ;
22
- linkedList . addNode ( node )
23
- expect ( linkedList . head ( ) ) . toBeTruthy ( )
24
- } ) ;
25
-
26
- test ( "should return total count of nodes" , ( ) => {
27
- let node = new Node ( ) ;
28
- linkedList . addNode ( node )
29
- expect ( linkedList . count ( ) ) . toEqual ( 1 )
30
- } ) ;
31
-
32
- test ( "should find a node and return it" , ( ) => {
33
- let node = new Node ( ) ;
34
- let node2 = new Node ( ) ;
35
- linkedList . addNode ( node )
36
- linkedList . addNode ( node2 )
37
- let result = linkedList . find ( node ) ;
38
- expect ( result ) . toEqual ( node ) ;
39
- } ) ;
40
-
41
- test ( "should remove a node" , ( ) => {
42
- let aNode = new Node ( ) ;
43
- let bNode = new Node ( ) ;
44
- let cNode = new Node ( ) ;
45
- let dNode = new Node ( ) ;
46
- linkedList . addNode ( aNode )
47
- linkedList . addNode ( bNode )
48
- linkedList . addNode ( cNode )
49
- linkedList . addNode ( dNode )
50
- linkedList . remove ( cNode ) ;
51
- expect ( linkedList . count ( ) ) . toEqual ( 3 ) ;
52
- expect ( linkedList . bNode . next ( ) ) . toEqual ( dNode ) ;
53
- } ) ;
54
- } )
20
+ // test("should return head node", () => {
21
+ // let node = new Node();
22
+ // linkedList.add (node)
23
+ // expect(linkedList.head()).toBeTruthy()
24
+ // });
25
+
26
+ // test("should return total count of nodes", () => {
27
+ // let node = new Node();
28
+ // linkedList.add (node)
29
+ // expect(linkedList.count()).toEqual(1)
30
+ // });
31
+
32
+ // test("should find a node and return it", () => {
33
+ // let node = new Node();
34
+ // let node2 = new Node();
35
+ // linkedList.add (node)
36
+ // linkedList.add (node2)
37
+ // let result = linkedList.find(node);
38
+ // expect(result).toEqual(node);
39
+ // });
40
+
41
+ // test("should remove a node", () => {
42
+ // let aNode = new Node();
43
+ // let bNode = new Node();
44
+ // let cNode = new Node();
45
+ // let dNode = new Node();
46
+ // linkedList.add (aNode)
47
+ // linkedList.add (bNode)
48
+ // linkedList.add (cNode)
49
+ // linkedList.add (dNode)
50
+ // linkedList.remove(cNode);
51
+ // expect(linkedList.count()).toEqual(3);
52
+ // expect(linkedList.bNode.next()).toEqual(dNode);
53
+ // });
54
+ } )
0 commit comments