summaryrefslogtreecommitdiff
path: root/platform/node/test/render.test.js
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2015-08-31 17:20:18 -0700
committerJohn Firebaugh <john.firebaugh@gmail.com>2015-08-31 17:20:18 -0700
commit92f8372d0c2901b0fff70bc4eb0b5a17337ae5b9 (patch)
tree9c6a7539c3067b07721cfecb3c833dec0d1c4577 /platform/node/test/render.test.js
parentabc1c84fb817a8e31dd1226a633dc895fdae602e (diff)
downloadqtlocation-mapboxgl-92f8372d0c2901b0fff70bc4eb0b5a17337ae5b9.tar.gz
Always release map
Diffstat (limited to 'platform/node/test/render.test.js')
-rw-r--r--platform/node/test/render.test.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/platform/node/test/render.test.js b/platform/node/test/render.test.js
index 6045aae385..b97b047475 100644
--- a/platform/node/test/render.test.js
+++ b/platform/node/test/render.test.js
@@ -37,6 +37,11 @@ function renderTest(style, info, base, key) {
t.once('end', function() {
clearTimeout(watchdog);
+
+ if (map) {
+ map.release();
+ map = null;
+ }
});
var options = {};
@@ -53,8 +58,6 @@ function renderTest(style, info, base, key) {
map.load(style);
map.render(info[key], function(err, data) {
- map.release();
-
if (err) {
console.log('THIS IS AN ERROR');
t.error(err);