Merge pull request #3252 from tschaub/global-spy

Avoid leaking global listenerSpy.
This commit is contained in:
Tim Schaub
2015-02-19 00:09:59 -07:00

View File

@@ -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);
});