-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
4 changed files
with
99 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,19 @@ | ||
var Writable = require('stream').Writable, | ||
util = require('util'); | ||
'use strict'; | ||
|
||
var TestStream = function() { | ||
Writable.call(this, {objectMode: true}); | ||
this.count = 0; | ||
}; | ||
const Writable = require('stream').Writable; | ||
|
||
util.inherits(TestStream, Writable); | ||
|
||
TestStream.prototype._write = function(chunk, encoding, callback) { | ||
this.count++; | ||
callback(); | ||
}; | ||
|
||
TestStream.prototype.testData = function() { | ||
return { count: this.count }; | ||
}; | ||
class TestStream extends Writable { | ||
constructor(options) { | ||
super(options); | ||
this.count = 0; | ||
} | ||
_write(chunk, encoding, done) { | ||
this.count++; | ||
done(); | ||
} | ||
testData() { | ||
return { count: this.count }; | ||
} | ||
} | ||
|
||
module.exports = TestStream; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,36 @@ | ||
var Bytes = require('../lib/bytes.js'), | ||
testFunctions = require('./testFunctions.js'); | ||
'use strict'; | ||
|
||
// describe('Pluto', function(){ | ||
// var dataset = Bytes.Pluto; | ||
// var counts = { MN: 42958, BX: 89830, BK: 277131, QN: 324403, SI: 124048 }; | ||
// testFunctions.allTests(dataset, { }, counts); | ||
// }); | ||
/* global describe */ | ||
|
||
const Bytes = require('../lib/bytes.js'); | ||
const testFunctions = require('./testFunctions.js'); | ||
|
||
describe('Pluto', () => { | ||
var dataset = Bytes.Pluto; | ||
var counts = { MN: 42958, BX: 89830, BK: 277131, QN: 324403, SI: 124048 }; | ||
testFunctions.allTests(dataset, { }, counts); | ||
}); | ||
|
||
describe('MapPluto', function(){ | ||
var dataset = Bytes.MapPluto; | ||
var counts = { MN: 42697, BX: 89687, BK: 276930, QN: 324181, SI: 123721 }; | ||
var counts = { MN: 42686, BX: 89685, BK: 276909, QN: 324168, SI: 123789 }; | ||
testFunctions.allTests(dataset, { }, counts); | ||
}); | ||
|
||
// describe('ZoningTaxLot', function(){ | ||
// var dataset = Bytes.ZoningTaxLot; | ||
// var counts = { MN: 42995, BX: 89798, BK: 277135, QN: 324346, SI: 124131 }; | ||
// testFunctions.allTests(dataset, { }, counts); | ||
// }); | ||
// | ||
// describe('PAD', function(){ | ||
// var dataset = Bytes.PAD; | ||
// var bblCounts = { Total: 880814 }; | ||
// var adrCounts = { Total: 1292406 }; | ||
// describe('BBL', function(){ | ||
// testFunctions.allTests(dataset, { table: 'BBL' }, bblCounts, true); | ||
// }); | ||
// describe('ADR', function(){ | ||
// testFunctions.allTests(dataset, { table: 'ADR' }, adrCounts, true, true); | ||
// }); | ||
// }); | ||
describe('ZoningTaxLot', function(){ | ||
var dataset = Bytes.ZoningTaxLot; | ||
var counts = { MN: 43017, BX: 89810, BK: 277218, QN: 324396, SI: 124169 }; | ||
testFunctions.allTests(dataset, { }, counts); | ||
}); | ||
|
||
describe('PAD', function(){ | ||
var dataset = Bytes.PAD; | ||
var bblCounts = { Total: 880969 }; | ||
var adrCounts = { Total: 1299356 }; | ||
describe('BBL', function(){ | ||
testFunctions.allTests(dataset, { table: 'BBL' }, bblCounts, true); | ||
}); | ||
describe('ADR', function(){ | ||
testFunctions.allTests(dataset, { table: 'ADR' }, adrCounts, true, true); | ||
}); | ||
}); |