Skip to content

Commit 3077faf

Browse files
committed
Remove debug code and general cleanup
1 parent 35f3249 commit 3077faf

File tree

4 files changed

+13
-16
lines changed

4 files changed

+13
-16
lines changed

src/v1/internal/connector.js

+1
Original file line numberDiff line numberDiff 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
*/
342343
function connect( url, channel = null) {

src/v1/internal/packstream.js

+1-6
Original file line numberDiff line numberDiff 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();

test/internal/packstream.test.js

+8-8
Original file line numberDiff line numberDiff 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( "" );

test/v1/tck/steps/steps.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -108,10 +108,11 @@ module.exports = function () {
108108
});
109109

110110
this.When(/^adding a copy of map M to map 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(/^the driver asks the server to echo this value back$/, function () {

0 commit comments

Comments
 (0)