summaryrefslogtreecommitdiff
path: root/platform/node
diff options
context:
space:
mode:
authorThiago Marcos P. Santos <thiago@mapbox.com>2016-02-20 13:31:24 +0200
committerThiago Marcos P. Santos <thiago@mapbox.com>2016-02-20 18:16:33 +0200
commit8219d72135c007c44b61a781c95c817a8618c478 (patch)
tree23e32ae8c03d690f5b7dcd20a338fde55f32e032 /platform/node
parent3633fd7ebdb2f406f17cf05320f9480a73455e09 (diff)
downloadqtlocation-mapboxgl-8219d72135c007c44b61a781c95c817a8618c478.tar.gz
[node] Not all tests were calling `map.release()`
Which prevents the test runner to close.
Diffstat (limited to 'platform/node')
-rw-r--r--platform/node/test/js/map.test.js11
1 files changed, 8 insertions, 3 deletions
diff --git a/platform/node/test/js/map.test.js b/platform/node/test/js/map.test.js
index ba704977ee..48bd6fe65f 100644
--- a/platform/node/test/js/map.test.js
+++ b/platform/node/test/js/map.test.js
@@ -41,7 +41,8 @@ test('Map', function(t) {
options.request = function() {};
t.doesNotThrow(function() {
- new mbgl.Map(options);
+ var map = new mbgl.Map(options);
+ map.release();
});
t.end();
@@ -59,7 +60,8 @@ test('Map', function(t) {
options.cancel = function() {};
t.doesNotThrow(function() {
- new mbgl.Map(options);
+ var map = new mbgl.Map(options);
+ map.release();
});
t.end();
@@ -78,7 +80,8 @@ test('Map', function(t) {
options.ratio = 1.0;
t.doesNotThrow(function() {
- new mbgl.Map(options);
+ var map = new mbgl.Map(options);
+ map.release();
});
t.end();
@@ -300,6 +303,7 @@ test('Map', function(t) {
});
map.load(style);
map.render({ zoom: 1 }, function(err, data) {
+ map.release();
t.ok(err, 'returns error');
t.equal(err.message, 'request error');
t.end();
@@ -314,6 +318,7 @@ test('Map', function(t) {
});
map.load(style);
map.render({ zoom: 1 }, function(err, data) {
+ map.release();
t.ok(data, 'no error');
t.end();
});