relevance / blue-ridge

Framework for JavaScript Testing (currently a Rails Plugin)
http://groups.google.com/group/blueridgejs
MIT License
480 stars 40 forks source link

Tests do not run in super-fast JavaScript engines (Safari 4 & Chrome) #21

Open karnowski opened 15 years ago

karnowski commented 15 years ago

Chad Humphries and I spent a day trying to track this down, and we haven't found it yet, but it looks like the timing of Screw.Unit, jQuery, and the BlueRidge requires are in such an order that Safari never fires the jQuery ready function. So your Screw.Unit specs never run. (Actually, it might be firing the ready function, just before BlueRidge and Screw.Unit are ready for it.)

Still more work to do, any ideas welcome.

karnowski commented 15 years ago

Looked into this a bit more, and the tests are not running in exactly the same way in Google Chrome too (both on Windows, version 2.0.172.43, and Chromium on Mac, the 2009/09/04 nightly). It appears that the require() functions and the jQuery ready() timing are out of whack on Nitro (Safari's JS engine) and V8 (Chrome's JS engine).

ndp commented 14 years ago

Fixed in my latest master-- explicitly call ScrewUnit to get things going, instead of relying on the unreliable onload behavior.