<div dir="ltr">On 31 July 2013 16:07, Will Tomlins <span dir="ltr"><<a href="mailto:will@tomlins.org.uk" target="_blank">will@tomlins.org.uk</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div style="word-wrap:break-word"><div>Just a thought, but have you considered making use of node?  I've had some success unit testing using jasmine with grunt-contrib-jasmine (<a href="https://github.com/gruntjs/grunt-contrib-jasmine" target="_blank">https://github.com/gruntjs/grunt-contrib-jasmine</a>) but using PhantomJS as a test runtime.</div>
</div></blockquote><div><br></div><div>Yes. Not those exact tools, but yes. I actually maintain my own test framework that runs on Node (and lots of other platforms), and my current concat/minify build tool is written in Node, mostly so I can use the Uglify scripting API to make it build working source maps.</div>
<div><br></div><div>I'm still of the opinion that JS test suites should consist only of static files, because of my experience trying to get test suites to run across a ton of different platforms. So relying on a server, be it Rails or Node, is out.</div>
<div><br></div><div><rant> Stuff like grunt-contrib-jasmine is exactly what I was referring to with "weird opaque and brittle glue libraries". They always tend to couple one test framework very tightly to one target platform (in this case Jasmine to PhantomJS, and both of these to Grunt), mix in a bunch of unrelated concerns so so that you can't handle those concerns yourself (see all the options this lib supports) and don't expose their functionality in a generically useful way (such as hiding a ton of functionality behind an interface you can only use through Grunt). Given the combinatorial explosion of JS frameworks and runtimes, these tools make it hard to run your tests on a variety of platforms, encourage you to couple your tests to them, mask portability problems in the underlying tools with brittle glue, and fail as soon as you have a use case the author didn't think of, which happens a lot, at which point you need to disentangle your tests from the tool and migrate to some other thing. </rant></div>
</div></div></div>