Hi, i'm trying to run Jasmine 1.0.2 in RhinoJs 1.7r2. I'm launching rhino with this command line on Windows:
--
You received this message because you are subscribed to the Google Groups "Jasmine" group.
To post to this group, send email to jasmi...@googlegroups.com.
To unsubscribe from this group, send email to jasmine-js+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/jasmine-js?hl=en.
Hmm interesting examples, thanks.
Seems that Jasmine assumes a browser environment, so EnvJS become a requirement for running specs on Rhino. This normally is not a problem, because the code under test is code meant to run in a browser, but the code i'm testing is not meant to run in browser so EnvJS is an unwanted dependency.
Previously i was using QUnit, i've switched to Jasmine because docs said that can run in various non browser environment, but this seems not true :-(
Gian Marco Gherardi
(sent from Android device)
First is that it's a virtual DOM. Relying on it to be vald is only as good as it's ability to emulate/mock what a real browser can do. This is not a huge problem for you writing your JavaScript, but it can introduce subtle false-positives over time as DOM evolves. Which is a fine and reasonable cost as long as the emulation is maintained.
Which gets to the second problem. Env.js isn't (or wasn't, I've lost track) maintained. There are multiple forks and each one has different idiosyncratic interactions with the different frameworks out there. For example, when I last tried to get JazzMoney to work the different forks of Env.js had different problems with Prototype.js's AJAX calls. I couldn't get a combination to work.
Headless JS testing is awesome, don't get me wrong. But I'd take a look at PhantomJS and capybara-webkit for headless browsers - webkit without GUI - as an approach to deal with real DOM. And then hope, as we always do, that these projects are better maintained than Env was/is.
I am currently working on integrating PhantomJS into the build process for a project I am working on. I've got a simple test runner so far, which you may be interested in, and I'm looking into options for generating JUnit-style XML output for my build server (Hudson) to consume.