A generalized port of the CouchDB JavaScript test harness.