Switch tests to mocha.

This commit is contained in:
Young Hahn
2013-07-12 04:22:00 -04:00
parent feeb49ac30
commit 4cf1dcc173
8 changed files with 303 additions and 551 deletions

View File

@@ -164,7 +164,7 @@ MBTiles.prototype.getTile = function(z, x, y, callback) {
'zoom_level = ? AND tile_column = ? AND tile_row = ?',
z, x, y,
function(err, row) {
if (!row || (err && err.errno == 1)) {
if ((!err && !row) || (err && err.errno == 1)) {
return callback(new Error('Tile does not exist'));
} else if (err) {
return callback(err);