diff options
Diffstat (limited to 'test')
| -rw-r--r-- | test/jqLiteSpec.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/jqLiteSpec.js b/test/jqLiteSpec.js index 08100658..de9c74da 100644 --- a/test/jqLiteSpec.js +++ b/test/jqLiteSpec.js @@ -1343,6 +1343,18 @@ describe('jqLite', function() { event = pokeSpy.mostRecentCall.args[0]; expect(event.preventDefault).toBeDefined(); }); + + it('should pass data as an additional argument', function() { + var element = jqLite('<a>poke</a>'), + pokeSpy = jasmine.createSpy('poke'), + data; + + element.on('click', pokeSpy); + + element.triggerHandler('click', [{hello: "world"}]); + data = pokeSpy.mostRecentCall.args[1]; + expect(data.hello).toBe("world"); + }); }); |
