Skip to content

Commit

Permalink
Fix so that error message works for both systems
Browse files Browse the repository at this point in the history
  • Loading branch information
flippmoke committed Mar 28, 2016
1 parent 92ef44b commit 89c8b76
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions test/tm2z.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,14 @@ Vector.mapnik.register_fonts(path.join(__dirname, 'fonts', 'source-sans-pro'));
});
});

test('tm2z+http Z_DATA_ERROR', function(assert) {
test('tm2z+http ENOTFOUND or Z_DATA_ERROR', function(assert) {
tilelive.load('tm2z+http://not-a-valid-domain/patternstyle.tm2z', function(err, source) {
assert.ok(err, 'has error');
assert.equal(err.code, 'Z_DATA_ERROR', 'code: Z_DATA_ERROR');
if (err.code && err.code === 'Z_DATA_ERROR') {
assert.equal(err.code, 'Z_DATA_ERROR', 'code: Z_DATA_ERROR');
} else {
assert.equal(err.code, 'ENOTFOUND', 'code: ENOTFOUND');
}
assert.end();
});
});
Expand Down

0 comments on commit 89c8b76

Please sign in to comment.