Skip to content

Commit

Permalink
Fix failing unit test (#2902)
Browse files Browse the repository at this point in the history
* Fix failing unit test

* Improve failing test debug output
  • Loading branch information
lucaswoj authored Jul 22, 2016
1 parent 612a27f commit 79a4fee
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/js/ui/map.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -893,14 +893,14 @@ test('Map', function(t) {
});

t.test('calls listeners', function (t) {
sinon.stub(console, 'error', function() {
console.error.restore();
t.fail();
sinon.stub(console, 'error', function(event) {
t.fail(event.error);
});

var map = createMap({ style: { version: 8, sources: {}, layers: [] } });
map.on('error', function(event) {
t.equal(event.error.message, 'version: expected one of [8], 7 found');
console.error.restore();
t.end();
});
map.setStyle({ version: 7, sources: {}, layers: [] });
Expand Down

0 comments on commit 79a4fee

Please sign in to comment.