File tree Expand file tree Collapse file tree 4 files changed +13
-16
lines changed Expand file tree Collapse file tree 4 files changed +13
-16
lines changed Original file line number Diff line number Diff line change @@ -337,6 +337,7 @@ class Connection {
337337 * Crete new connection to the provided url.
338338 * @access private
339339 * @param {string } url - 'neo4j'-prefixed URL to Neo4j Bolt endpoint
340+ * @param {Channel } channel - Optionally inject Channel to be used.
340341 * @return {Connection } - New connection
341342 */
342343function connect ( url , channel = null ) {
Original file line number Diff line number Diff line change @@ -65,11 +65,7 @@ class Structure {
6565 for ( var i = 0 ; i < this . fields . length ; i ++ ) {
6666 if ( i > 0 ) { fieldStr += ", " }
6767 fieldStr += this . fields [ i ] ;
68- } ;
69-
70- var util = require ( 'util' )
71- console . log ( util . inspect ( this ) ) ;
72-
68+ }
7369 return "Structure(" + this . signature + ", [" + this . fields + "])"
7470 }
7571}
@@ -305,7 +301,6 @@ class Unpacker {
305301 return int ( buffer . readInt16 ( ) ) ;
306302 } else if ( marker == INT_32 ) {
307303 let b = buffer . readInt32 ( ) ;
308- console . log ( b ) ;
309304 return int ( b ) ;
310305 } else if ( marker == INT_64 ) {
311306 let high = buffer . readInt32 ( ) ;
Original file line number Diff line number Diff line change @@ -29,20 +29,20 @@ describe('packstream', function() {
2929 it ( 'should pack integers' , function ( ) {
3030 var n , i ;
3131 // test small numbers
32- // for(n = -999; n <= 999; n += 1) {
33- // i = Integer.fromNumber(n);
34- // expect( packAndUnpack( i ).toString() ).toBe( i.toString() );
35- // }
32+ for ( n = - 999 ; n <= 999 ; n += 1 ) {
33+ i = Integer . fromNumber ( n ) ;
34+ expect ( packAndUnpack ( i ) . toString ( ) ) . toBe ( i . toString ( ) ) ;
35+ }
3636 // positive numbers
3737 for ( n = 16 ; n <= 16 ; n += 1 ) {
3838 i = Integer . fromNumber ( Math . pow ( 2 , n ) ) ;
3939 expect ( packAndUnpack ( i ) . toString ( ) ) . toBe ( i . toString ( ) ) ;
4040 }
4141 // negative numbers
42- // for(n = 0; n <= 63 ; n += 1) {
43- // i = Integer.fromNumber(-Math.pow(2, n));
44- // expect( packAndUnpack( i ).toString() ).toBe( i.toString() );
45- // }
42+ for ( n = 0 ; n <= 63 ; n += 1 ) {
43+ i = Integer . fromNumber ( - Math . pow ( 2 , n ) ) ;
44+ expect ( packAndUnpack ( i ) . toString ( ) ) . toBe ( i . toString ( ) ) ;
45+ }
4646 } ) ;
4747 it ( 'should pack strings' , function ( ) {
4848 expect ( packAndUnpack ( "" ) ) . toBe ( "" ) ;
Original file line number Diff line number Diff line change @@ -108,10 +108,11 @@ module.exports = function () {
108108 } ) ;
109109
110110 this . When ( / ^ a d d i n g a c o p y o f m a p M t o m a p M $ / , function ( ) {
111- var copyt_of_map = { }
111+ var copy_of_map = { }
112112 for ( var key in this . M ) {
113- copyt_of_map [ key ] = this . M [ key ]
113+ copy_of_map [ key ] = this . M [ key ]
114114 }
115+ this . M [ "a" + sizeOfObject ( this . M ) ] = copy_of_map ;
115116 } ) ;
116117
117118 this . When ( / ^ t h e d r i v e r a s k s t h e s e r v e r t o e c h o t h i s v a l u e b a c k $ / , function ( ) {
You can’t perform that action at this time.
0 commit comments