couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "nicholas a. evans" <>
Subject View specs using jasmine and node
Date Mon, 26 Aug 2013 16:35:39 GMT
I've strung together Jasmine, webmake (npm package), and the source
files for my views to make a spec suite that can be run in my browser.
 It's getting the job done and helped me identify some bugs and
develop some new views, but I'm not particularly happy with it.  It
requires annoying hacks in my view source files and the specs, and it
only runs in the browser.

I know that some folks around here have better node-fu than me, and
have put together their own testing and debugging toolchains.  Are any
of those publicly visible on github?  Ideally, I'd like the following:

 * It can run from the command line with useful a output format and
appropriate exit status.
 * It makes debugging easy (preferably, it runs in browser under
Firebug or Chrome Inspector).
 * It supports CommonJS modules (roughly the same way CouchDB does).
 * It can grab/use unmodified map.js and reduce.js files from a
couchapp style directory structure (alternately, can grab unmodified
{map,reduce}.js files from any arbitrary filesystem location).
 * It tests the view functions as pure functions without any network
connections to CouchDb.  It should be *fast*.  I just want to unit
test my more complicated view functions.  For integrated test suites
looking at the full stack behavior, I'm using ruby, since that's what
the rest of my application is written in.

Quick google and github searches didn't turn up anything.  Any advice?

Nick Evans

View raw message