You can take a look on my blog post: http://pawelstawicki.blogspot.com/2009/12/couchdb.html At the end are reduce parameters explained.
Best regards -- Paweł Stawicki http://pawelstawicki.blogspot.com http://szczecin.jug.pl On Mon, Sep 13, 2010 at 17:02, Johannes Schneider <[email protected]> wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > I have done something similar. But I don't understand the parameters for > the reduce functions (yet). Could you paste me your mock > implementations/calls for the reduce functions? > > > Thanks, > > Johannes > > On 09/10/2010 12:58 PM, Julian Doherty wrote: >> I've used Rhino (Java based Javascript interpreter) to test map/reduce >> functions before. You need to expose an "emit" function and probably make >> assertions on what gets passed to it. >> >> Apart from that the map/reduce functions as called by Couch are pretty >> idempotent, so are easy to test in isolation. >> >> On 9 September 2010 23:08, Johannes Schneider <[email protected]>wrote: >> >> Hi guys, >> >> I would like to test my map and reduce functions without CouchDB. I'd >> like to write some unit tests that verify that those functions work as >> expected... >> >> Does anybody out there have any hints how this can be done? If it is >> Java based and portable this would be great... >> >> >> Thanks, >> >> Johannes >>> > > - -- > Johannes Schneider - blog.cedarsoft.com > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.10 (GNU/Linux) > > iQEcBAEBAgAGBQJMjj0fAAoJEAytD9R7Qv6dB0AIAM4uheyZxNWucvPQ5G61T/k+ > 4OVpBg4iDtIlBkLoZN36tYvETtHyuQErEldtFJxintxDR9lUlt5H0Qo+s015/DXw > drtcRbt3CHMDVIsYgh35YdEPx+A4Yyiz52QtScSbQwKYeSfRWgPGHm/H606klRrL > R83cPn6Rxioy2MtX0qlPyPNVqTcqa494EnZRjbKuYVSZh8D2p1pOJFUyN5+d1rLI > 4QDR4B2lyb2XcDfa88GLMj1KKbSYT0WiCpobkUpJWdUnxhZYAQdIQBggsssYwBGc > i8i5QyCwBPNQLnvN8GJ5vqP/ZFKOXNrdqrHjYZRyRir6z2H92IPJlzTOvfoUZOc= > =1IPr > -----END PGP SIGNATURE----- >
