Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

Commit 46a6b03

Browse files
committed
[node] Fix race condition in tests
The message callback races with the rest of this test. We already have tests for errors being emitted from mbgl, so just remove it.
1 parent f277230 commit 46a6b03

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

platform/node/test/js/map.test.js

-8
Original file line numberDiff line numberDiff line change
@@ -218,17 +218,9 @@ test('Map', function(t) {
218218
});
219219

220220
t.test('returns an error', function(t) {
221-
mbgl.on('message', function(msg) {
222-
t.ok(msg, 'emits error');
223-
t.equal(msg.class, 'Style');
224-
t.equal(msg.severity, 'ERROR');
225-
t.ok(msg.text.match(/Failed to load/), 'error text matches');
226-
});
227-
228221
var map = new mbgl.Map(options);
229222
map.load(style);
230223
map.render({ zoom: 1 }, function(err, data) {
231-
mbgl.removeAllListeners('message');
232224
map.release();
233225

234226
t.ok(err, 'returns error');

0 commit comments

Comments
 (0)