Quantcast
Channel: JavaScriptMVC Forum
Viewing all articles
Browse latest Browse all 3491

Re : Testing CanJS Web Apps

$
0
0
I just tried your fix and it worked. Thank you for your time guys.

I was looking threw the source code of the framework and could not understand yet why the routing did not work when using AMD.

I really recommend focusing on Require.js`s AMD programming style than steal. I think more people will use Require.js than steal.
I have never tried steal, but I think Can.js should focus on well known standards like Jasmine/Qunit, Require.js and Squire.js for testing and developing.

I have one more question. When testing a controller, how can someone trigger a route action for testing purposes.
I tried this with no luck so far:
  1. $(helloWorldController).trigger('about/2');  
  2. $(helloWorldController).trigger('route); 
In Jasmine, when setting the window.location.hash to = #!about/1 programmatically in the test the url will be removed before the url has changed, so my canjs test controller does not catch the url change yet. I have to manually add the url for it to see, thats why I need a way of triggering the route another way.

Also when will the next version of Can.js be released? 
I really would like to know whats coming. I hope its very soon.



Viewing all articles
Browse latest Browse all 3491

Trending Articles