From e6c442bf4ee78cfb3be68d694c669b1cde86ecd9 Mon Sep 17 00:00:00 2001 From: "Thiago Marcos P. Santos" Date: Tue, 16 Jun 2015 15:59:55 +0300 Subject: [PATCH] Adjusts tests for the new API Unskip tests that should be passing now and adjust error messages to reflect recent changes. --- test/js/gzip.test.js | 2 +- test/js/map.test.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/test/js/gzip.test.js b/test/js/gzip.test.js index 2ed0080ac..c839dd5c2 100644 --- a/test/js/gzip.test.js +++ b/test/js/gzip.test.js @@ -116,7 +116,7 @@ test('gzip', function(t) { map.release(); t.ok(err, 'returns error'); - t.equal(err.message, 'Error rendering image'); + t.ok(err.message.match(/Failed to parse/), 'error text matches'); t.end(); }); diff --git a/test/js/map.test.js b/test/js/map.test.js index 427cf586b..edeab8370 100644 --- a/test/js/map.test.js +++ b/test/js/map.test.js @@ -338,11 +338,11 @@ test('Map', function(t) { }); }); - t.skip('requires a style to be set', function(t) { + t.test('requires a style to be set', function(t) { setup(fileSource, function(map) { t.throws(function() { map.render({}, function() {}); - }, /Style is not set/); + }, /Style is not loaded/); map.release(); @@ -365,7 +365,7 @@ test('Map', function(t) { map.release(); t.ok(err, 'returns error'); - t.equal(err.message, 'Error rendering image'); + t.ok(err.message.match(/Failed to load/), 'error text matches'); t.end(); });