Hi,
I'm attempting to unit test(using Jasmine) an angular directive containing a call to jquery('element').kendoAutoComplete(...). We are using jstestdriver to launch our unit tests in a chrome browser, and this also allows us to breakpoint the javascript and create watch expressions.
We have added the kendo.all.min.js and kendo.core.js scripts to the jsTestDriver configuration and they are visible when the browser is open during the unit test runs.
My problem is, that at the point of creating the xyz = new kendo.data.DataSource(...) the DataSource has not been initialized and is tripping up my unit tests. I am able to create a watch expression(in Chrome) on the kendo.data portion, so it seems that some of kendo is loading and working. We do have other tests running on things like the kendoDatePicker and those run fine.
I have tried searching for ways to mock out the DataSource, but it would help if I could see the code behind the object to know what needs to be mocked however I have been unsuccessful in finding the source for the kendo DataSource object(can someone help me with this?).
The actual code evaluates properly when deployed in the main application and doesnt have this issue. Could this be as a result of the DataSource not being attached due to missing code/a missing function call? Is there some way of me manually getting it to be attached?
I'm attempting to unit test(using Jasmine) an angular directive containing a call to jquery('element').kendoAutoComplete(...). We are using jstestdriver to launch our unit tests in a chrome browser, and this also allows us to breakpoint the javascript and create watch expressions.
We have added the kendo.all.min.js and kendo.core.js scripts to the jsTestDriver configuration and they are visible when the browser is open during the unit test runs.
My problem is, that at the point of creating the xyz = new kendo.data.DataSource(...) the DataSource has not been initialized and is tripping up my unit tests. I am able to create a watch expression(in Chrome) on the kendo.data portion, so it seems that some of kendo is loading and working. We do have other tests running on things like the kendoDatePicker and those run fine.
I have tried searching for ways to mock out the DataSource, but it would help if I could see the code behind the object to know what needs to be mocked however I have been unsuccessful in finding the source for the kendo DataSource object(can someone help me with this?).
The actual code evaluates properly when deployed in the main application and doesnt have this issue. Could this be as a result of the DataSource not being attached due to missing code/a missing function call? Is there some way of me manually getting it to be attached?