scribe-editor
Advanced tools
Comparing version 1.3.5 to 1.3.6
@@ -0,1 +1,8 @@ | ||
# 1.3.6 | ||
Fixes a bug preventing individual events being switched off events in the event-emitter | ||
Bumps Lodash to 3.5.0 in the NPM package description for those using CommonJS builds | ||
Thanks [Ryan Fitzgerald](https://github.com/rf-)! | ||
# 1.3.5 | ||
@@ -2,0 +9,0 @@ |
{ | ||
"name": "scribe-editor", | ||
"version": "1.3.5", | ||
"version": "1.3.6", | ||
"main": "src/scribe.js", | ||
"dependencies": { | ||
"lodash-amd": "~2.4.1", | ||
"lodash-amd": "~3.5.0", | ||
"immutable": "~3.6.2" | ||
@@ -27,3 +27,3 @@ }, | ||
"request": "~2.33.0", | ||
"scribe-test-harness": "~0.0.19", | ||
"scribe-test-harness": "~0.0.20", | ||
"selenium-webdriver": "~2.41.0", | ||
@@ -30,0 +30,0 @@ "sinon": "^1.12.2" |
@@ -22,5 +22,5 @@ define(['lodash-amd/modern/array/pull', | ||
if (fn) { | ||
this._listeners = listeners.delete(fn); | ||
this._listeners[eventName] = listeners.delete(fn); | ||
} else { | ||
this._listeners = listeners.clear(); | ||
this._listeners[eventName] = listeners.clear(); | ||
} | ||
@@ -27,0 +27,0 @@ }; |
@@ -42,11 +42,35 @@ require('node-amd-require')({ | ||
it('should remove listeners when off is called', function(){ | ||
var handle = sinon.spy(); | ||
emitter.on('event', handle); | ||
it('should remove a specific listener when off is called', function(){ | ||
var handleOne = sinon.spy(); | ||
var handleTwo = sinon.spy(); | ||
emitter.on('event', handleOne); | ||
emitter.on('event', handleTwo); | ||
emitter.trigger('event'); | ||
emitter.off('event', handle); | ||
emitter.off('event', handleOne); | ||
emitter.trigger('event'); | ||
expect(handle.callCount).to.equal(1); | ||
}) | ||
expect(handleOne.callCount).to.equal(1); | ||
expect(handleTwo.callCount).to.equal(2); | ||
}); | ||
it('should remove all listeners when off is called', function(){ | ||
var handleOne = sinon.spy(); | ||
var handleTwo = sinon.spy(); | ||
emitter.on('event', handleOne); | ||
emitter.on('event', handleTwo); | ||
emitter.trigger('event'); | ||
emitter.off('event'); | ||
emitter.trigger('event'); | ||
expect(handleOne.callCount).to.equal(1); | ||
expect(handleTwo.callCount).to.equal(1); | ||
}); | ||
}); |
198935
4139
+ Addedlodash-amd@3.5.0(transitive)
- Removedlodash-amd@2.4.1(transitive)
Updatedlodash-amd@~3.5.0