New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

couchdb-harness

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

couchdb-harness - npm Package Compare versions

Comparing version 0.0.3 to 0.0.4

index.js

3

package.json
{
"name": "couchdb-harness",
"version": "0.0.3",
"version": "0.0.4",
"description": "A generalized port of the CouchDB JavaScript test harness.",

@@ -9,2 +9,3 @@ "repository": {

},
"main": "./index.js",
"scripts": {

@@ -11,0 +12,0 @@ "start": "./bin/couchdb-harness"

@@ -5,2 +5,34 @@ # CouchDB Harness

## Install
```
npm install couchdb-harness
```
## Usage
### Command Line
To run the default configuration, you can simply type,
```
$ npm start
```
But the binary also accepts arguments to specify the port that the harness
should run against, as well as which files to test,
```
./bin/couchdb-harness -p 5984 basics all_docs
```
### Node.js
```
var harness = require('couchdb-harness');
harness.run(5984, ['basics', 'all_docs'], function (exitCode) {
process.exit(exitCode);
});
```
## License

@@ -7,0 +39,0 @@

@@ -16,5 +16,4 @@ // Licensed under the Apache License, Version 2.0 (the "License"); you may not

var result = JSON.parse(CouchDB.request("GET", "/").responseText);
// TODO: This hardly checks anything... over generalized.
T(typeof result === "object");
T(!!result.version);

@@ -49,7 +48,4 @@ var db = new CouchDB("test_suite_db", {"X-Couch-Full-Commit":"false"});

// Get the database info, check the db_name
T(db.info().db_name == "test_suite_db");
// TODO: This fails against pouchdb-server because PouchDB's info method
// returns a field `name`.
// T(db.info().db_name == "test_suite_db");
T(CouchDB.allDbs().some(function (db) {

@@ -133,6 +129,4 @@ return /test_suite_db/.test(db);

// TODO: This fails against pouchdb-server because PouchDB's query api
// doesn't return a `total_rows` property on the result object.
// verify only one document found and the result value (doc.b).
// T(results.total_rows == 1 && results.rows[0].value == 16);
T(results.total_rows == 1 && results.rows[0].value == 16);

@@ -151,5 +145,4 @@ // reopen document we saved earlier

// TODO: See previous todo.
// the modified document should now be in the results.
// T(results.total_rows == 2);
T(results.total_rows == 2);

@@ -163,4 +156,3 @@ // write 2 more documents

// 1 more document should now be in the result.
// TODO: See previous todo.
// T(results.total_rows == 3);
T(results.total_rows == 3);

@@ -187,4 +179,4 @@ // TODO: Not sure why this is failing? doc_count is 7 apparently...

// 1 less document should now be in the results.
// TODO: Same issue as above, PouchDB doesn't return total_rows.
// T(results.total_rows == 2);
T(results.total_rows == 2);
// TODO: Something is wrong with doc_count on pouchdb
// T(db.info().doc_count == 5);

@@ -191,0 +183,0 @@

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc