Return-Path: X-Original-To: apmail-couchdb-user-archive@www.apache.org Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 3329210978 for ; Mon, 26 Aug 2013 16:36:52 +0000 (UTC) Received: (qmail 19735 invoked by uid 500); 26 Aug 2013 16:36:50 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 19596 invoked by uid 500); 26 Aug 2013 16:36:48 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 19583 invoked by uid 99); 26 Aug 2013 16:36:46 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 26 Aug 2013 16:36:46 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of nicholas.evans@gmail.com designates 209.85.214.54 as permitted sender) Received: from [209.85.214.54] (HELO mail-bk0-f54.google.com) (209.85.214.54) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 26 Aug 2013 16:36:41 +0000 Received: by mail-bk0-f54.google.com with SMTP id mz12so1231496bkb.27 for ; Mon, 26 Aug 2013 09:36:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:from:date:message-id:subject:to:content-type; bh=JP5fwK5su5nO6i14Rs40/uPzJG0VeNfv4JkzH/PYlE4=; b=uwoOU1/rVJu5PSN3GzaxDvvCw5ZyRgOdhC9CpUhDIIxSHrjICfj/p171BC8OcFFeWU xXRkaAoHcl/vUzcqWsedQ++nTX0JJ9dJIrkXT5azyBPvkzFuMBwq6G+egRt8nqoDpF5W MQgk54fRqGdTU+hEyT8ipIjHCtmjc2g8tJ58A522CRpK7Fl7Bf6WlrVTEqZqstik6sa+ v4FUg4czsCbazvjvLaxo/QEUeUyxIBkybRV1qci1divLWLSnaWrBJPTa461dVX9P6z++ n6VQJd+wttdW8UsKxRN+4y8V/GQqOCE14w9e25beovIvTl6WxS4OoA7L8PcAl5hD3d8Q JnSA== X-Received: by 10.204.69.12 with SMTP id x12mr11112326bki.14.1377534979161; Mon, 26 Aug 2013 09:36:19 -0700 (PDT) MIME-Version: 1.0 Sender: nicholas.evans@gmail.com Received: by 10.204.235.197 with HTTP; Mon, 26 Aug 2013 09:35:39 -0700 (PDT) From: "nicholas a. evans" Date: Mon, 26 Aug 2013 12:35:39 -0400 X-Google-Sender-Auth: FV8jbbsIk8wSneYxiLAAgwKqh60 Message-ID: Subject: View specs using jasmine and node To: user@couchdb.apache.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org 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