From d0f5ebd7ab8f3700e9a314bf21273879f3f0c38b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Garc=C3=ADa=20Aubert?= Date: Fri, 11 Aug 2017 17:55:55 +0200 Subject: [PATCH] Restore statsClient after performing test --- test/unit/cartodb/ported/tile_stats.test.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/test/unit/cartodb/ported/tile_stats.test.js b/test/unit/cartodb/ported/tile_stats.test.js index 45b1fa29..b71f1384 100644 --- a/test/unit/cartodb/ported/tile_stats.test.js +++ b/test/unit/cartodb/ported/tile_stats.test.js @@ -6,10 +6,13 @@ var LayergroupController = require('../../../../lib/cartodb/controllers/layergro describe('tile stats', function() { - after(function() { - global.statsClient = null; + beforeEach(function () { + this.statsClient = global.statsClient; }); + afterEach(function() { + global.statsClient = this.statsClient; + }); it('finalizeGetTileOrGrid does not call statsClient when format is not supported', function() { var expectedCalls = 2, // it will call increment once for the general error