File tree 4 files changed +13
-16
lines changed
4 files changed +13
-16
lines changed Original file line number Diff line number Diff line change @@ -337,6 +337,7 @@ class Connection {
337
337
* Crete new connection to the provided url.
338
338
* @access private
339
339
* @param {string } url - 'neo4j'-prefixed URL to Neo4j Bolt endpoint
340
+ * @param {Channel } channel - Optionally inject Channel to be used.
340
341
* @return {Connection } - New connection
341
342
*/
342
343
function connect ( url , channel = null ) {
Original file line number Diff line number Diff line change @@ -65,11 +65,7 @@ class Structure {
65
65
for ( var i = 0 ; i < this . fields . length ; i ++ ) {
66
66
if ( i > 0 ) { fieldStr += ", " }
67
67
fieldStr += this . fields [ i ] ;
68
- } ;
69
-
70
- var util = require ( 'util' )
71
- console . log ( util . inspect ( this ) ) ;
72
-
68
+ }
73
69
return "Structure(" + this . signature + ", [" + this . fields + "])"
74
70
}
75
71
}
@@ -305,7 +301,6 @@ class Unpacker {
305
301
return int ( buffer . readInt16 ( ) ) ;
306
302
} else if ( marker == INT_32 ) {
307
303
let b = buffer . readInt32 ( ) ;
308
- console . log ( b ) ;
309
304
return int ( b ) ;
310
305
} else if ( marker == INT_64 ) {
311
306
let high = buffer . readInt32 ( ) ;
Original file line number Diff line number Diff line change @@ -29,20 +29,20 @@ describe('packstream', function() {
29
29
it ( 'should pack integers' , function ( ) {
30
30
var n , i ;
31
31
// 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
+ }
36
36
// positive numbers
37
37
for ( n = 16 ; n <= 16 ; n += 1 ) {
38
38
i = Integer . fromNumber ( Math . pow ( 2 , n ) ) ;
39
39
expect ( packAndUnpack ( i ) . toString ( ) ) . toBe ( i . toString ( ) ) ;
40
40
}
41
41
// 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
+ }
46
46
} ) ;
47
47
it ( 'should pack strings' , function ( ) {
48
48
expect ( packAndUnpack ( "" ) ) . toBe ( "" ) ;
Original file line number Diff line number Diff line change @@ -108,10 +108,11 @@ module.exports = function () {
108
108
} ) ;
109
109
110
110
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 = { }
112
112
for ( var key in this . M ) {
113
- copyt_of_map [ key ] = this . M [ key ]
113
+ copy_of_map [ key ] = this . M [ key ]
114
114
}
115
+ this . M [ "a" + sizeOfObject ( this . M ) ] = copy_of_map ;
115
116
} ) ;
116
117
117
118
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