describe('Event Test Suite', function () {
    'use strict';


    var expect = chai.expect;


    function inject(callback, isAysnc) {
        return function (done) {
            seajs.use(['/plugin/events'], function (Events) {

                if (isAysnc) {
                    callback(Events, done);
                } else {
                    callback(Events);
                    done();
                }

            });
        };
    }


    it('on and trigger', inject(function (Events) {
        var obj = {
            counter: 0
        };
        Object.assign(obj, Events);
        obj.on('event', function() {
            obj.counter += 1;
        });
        obj.trigger('event');
        expect(obj.counter).to.equal(1);
        obj.trigger('event');
        obj.trigger('event');
        obj.trigger('event');
        obj.trigger('event');
        expect(obj.counter).to.equal(5);
    }));


    it('binding and triggering multiple events', inject(function (Events) {
        var obj = {
            counter: 0
        };
        Object.assign(obj, Events);
 
        obj.on('a b c', function() {
            obj.counter += 1;
        });
 
        obj.trigger('a');
        expect(obj.counter).to.equal(1);
 
        obj.trigger('a b');
        expect(obj.counter).to.equal(3);
 
        obj.trigger('c');
        expect(obj.counter).to.equal(4);
 
        obj.off('a c');
        obj.trigger('a b c');
        expect(obj.counter).to.equal(5);
    }));


});

@@ -1473,12 +1473,705 @@
  %7D));%0A%0A%0A
+    it('binding and triggering with event maps', inject(function(Events) %7B%0A        var obj = %7Bcounter: 0%7D;%0A        Object.assign(obj, Events);%0A%0A        function increment() %7B%0A            this.counter += 1;%0A        %7D%0A%0A        obj.on(%7B%0A            a: increment,%0A            b: increment,%0A            c: increment%0A        %7D);%0A%0A        obj.trigger('a');%0A        expect(obj.counter).to.equal(1);%0A%0A        obj.trigger('a b');%0A        expect(obj.counter).to.equal(3);%0A%0A        obj.trigger('c');%0A        expect(obj.counter).to.equal(4);%0A%0A        obj.off(%7B%0A            a: increment,%0A            c: increment%0A        %7D);%0A        obj.trigger('a b c');%0A        expect(obj.counter).to.equal(5);%0A    %7D));%0A%0A%0A
 %7D);%0A

添加`binding and triggering with event maps`测试用例