From 3e3104bbb1a7b558b5027bcd9dc40004b48ba99f Mon Sep 17 00:00:00 2001 From: Tim Schaub Date: Wed, 18 Feb 2015 16:05:33 -0700 Subject: [PATCH] Avoid leaking global listenerSpy --- test/spec/ol/interaction/drawinteraction.test.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/spec/ol/interaction/drawinteraction.test.js b/test/spec/ol/interaction/drawinteraction.test.js index f49a3f870a..dfb2543763 100644 --- a/test/spec/ol/interaction/drawinteraction.test.js +++ b/test/spec/ol/interaction/drawinteraction.test.js @@ -504,7 +504,7 @@ describe('ol.interaction.Draw', function() { expect(interaction.sketchFeature_).to.be(null); }); it('fires change:active', function() { - listenerSpy = sinon.spy(function() { + var listenerSpy = sinon.spy(function() { // test that the interaction's change:active listener is called first expect(interaction.overlay_.map_).to.be(null); }); @@ -523,7 +523,7 @@ describe('ol.interaction.Draw', function() { expect(interaction.overlay_.map_).to.be(map); }); it('fires change:active', function() { - listenerSpy = sinon.spy(function() { + var listenerSpy = sinon.spy(function() { // test that the interaction's change:active listener is called first expect(interaction.overlay_.map_).not.to.be(null); });