Skip to content
Myr

remove "drop support for emitting multiple args" thing as per https://github.com/developit/mitt/pull/19#issuecomment-273344689

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

authored by tunnckoCore · committed by tunnckoCore · parent e814a57 · Browse files · 3 files+9 added−19 removed
This commit

State

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

Diff stats

3 files+9 added−19 removed

  • tests:+4 added−12 removed
  • other:+5 added−7 removed

3 files+9 added−19 removed

modified:src/index.js+4 added-5 removed
modified:test/index.js+4 added-12 removed
109 unmodified lines
110111 inst.emit('foo', event);112 });113114 it('should invoke handler with multiple (max 2) arguments', () => {115 inst.on('foo', (aaa, bbb) => {116 expect(aaa).to.be.equal(111);117 expect(bbb).to.be.equal(222);118 });119 inst.emit('foo', 111, 222);120 });121114 it('should NOT ignore case', () => {115 let foo = spy(),116 bar = spy(),117 num = 123;
7 unmodified lines
125 let args2 = bar.args[0];126127 expect(foo).to.have.been.calledOnce;128 expect(bar).to.have.been.calledOnce;137 expect(args1).to.be.deep.equal([num, undefined]);138 expect(args2).to.be.deep.equal([num, undefined]);129 expect(args1).to.be.deep.equal([num]);130 expect(args2).to.be.deep.equal([num]);131 });132133 it('should invoke * handlers', () => {134 let star = spy(),
6 unmodified lines
141 let args1 = star.args[0],142 args2 = star.args[1];143144 expect(star).to.have.been.calledTwice;153 expect(args1).to.deep.equal(['foo', aa, undefined]);154 expect(args2).to.deep.equal(['bar', aa, undefined]);145 expect(args1).to.deep.equal(['foo', aa]);146 expect(args2).to.deep.equal(['bar', aa]);147 });148 });149});
modified:README.md+1 added-2 removed