Add (failing) test against sqlite db without tiles table.

This commit is contained in:
Young Hahn
2014-10-29 18:09:29 -04:00
parent 2d1dc14119
commit cf72f04a70

View File

@@ -73,3 +73,24 @@ tape('zxystream batch = 10', function(assert) {
});
});
tape('zxystream empty', function(assert) {
new MBTiles(__dirname + '/fixtures/non_existent.mbtiles', function(err, s) {
assert.ifError(err);
source = s;
assert.end();
});
});
tape('zxystream empty zxystream', function(assert) {
var stream = source.createZXYStream();
var called = 0;
stream.on('data', function(lines) {
called++;
});
stream.on('end', function() {
assert.equal(called, 0, 'data never called');
assert.end();
});
});