migrate style test fixture to v8, handle errors more gracefully in render test

This commit is contained in:
Mike Morris
2015-08-25 14:57:23 -04:00
parent 6a31e6c801
commit 94af30ff4a
2 changed files with 31 additions and 25 deletions

View File

@@ -1,26 +1,29 @@
{
"version": 7,
"name": "Empty",
"sources": {
"mapbox": {
"type": "vector",
"url": "./fixtures/tiles.tilejson",
"maxzoom": 15
}
"version": 8,
"name": "Empty",
"sources": {
"mapbox": {
"type": "vector",
"url": "./fixtures/tiles.tilejson",
"maxzoom": 15
}
},
"layers": [
{
"id": "background",
"type": "background",
"paint": {
"background-color": "white"
}
},
"layers": [{
"id": "background",
"type": "background",
"paint": {
"background-color": "white"
}
}, {
"id": "water",
"type": "fill",
"source": "mapbox",
"source-layer": "water",
"paint": {
"fill-color": "blue"
}
}]
{
"id": "water",
"type": "fill",
"source": "mapbox",
"source-layer": "water",
"paint": {
"fill-color": "blue"
}
}
]
}

View File

@@ -53,10 +53,13 @@ function renderTest(style, info, base, key) {
map.load(style);
map.render(info[key], function(err, data) {
t.error(err);
map.release();
if (err) {
t.error(err);
return t.end();
}
var expected = path.join(dir, 'expected.png');
var actual = path.join(dir, 'actual.png');
var diff = path.join(dir, 'diff.png');