Skip to content
Myr

Add test for #124

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Jason Miller · committed by Jason Miller · parent 4cce9cb · Browse files · 1 file+11 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+11 added−0 removed

  • tests:+11 added−0 removed

1 file+11 added−0 removed

modified:test/index_test.ts+11 added
148 unmodified lines
149 expect(events.get('foo')).to.deep.equal([foo]);150 inst.off('foo', foo);151 expect(events.get('foo')).to.deep.equal([]);152 });153154 it('off("type") should remove all handlers of the given type', () => {155 inst.on('foo', () => {});156 inst.on('foo', () => {});157 inst.on('bar', () => {});158 inst.off('foo');159 expect(events.get('foo')).to.deep.equal([]);160 expect(events.get('bar')).to.have.length(1);161 inst.off('bar');162 expect(events.get('bar')).to.deep.equal([]);163 });164 });165166 describe('emit()', () => {167 it('should be a function', () => {
45 unmodified lines