Open m-a-r-c-e-l-i-n-o opened 9 years ago
+1 for this issue
+1 for me the issue seems related to the change from jquery 1.x to 2.x in terms of how data is handled. in 2.x the data is right on the element, since jasmine-jquery uses the data function of version 2 to get the events array it cannot get that data for element bound with jquery version 1.x which stores the data in a global cache.
update: looks like if you use the karma-jquery framework instead of manually including the 1.x version of jquery and place it after jasmine-jquery in the list of frameworks the bug is solved
Hello,
I originally posted this bug report on the jasmine-jquery github ( https://github.com/velesin/jasmine-jquery/issues/251 ), but it appears that the issue is Karma related. The bug is as follows:
The "toHandle" function:
Returns (failed test):
The "toHandleWith" Function:
Returns (error):
This is happening in an isolated installation of the following packages (running on Ubuntu 15.04): jasmine-core@2.3.2 karma@0.12.31 karma-jasmine@0.3.5 karma-jasmine-jquery@0.1.1 jquery@2.1.4
I narrowed it down to Karma because with an isolated installation using just jasmine with jasmine-jquery, both of those tests pass. This can be seen here: http://jsfiddle.net/marcbraulio/nqh7djsa/2/
Thank you for your time.