{"id":23705698,"url":"https://github.com/pouchdb/couchdb-harness","last_synced_at":"2025-06-25T10:32:18.977Z","repository":{"id":7342255,"uuid":"8665467","full_name":"pouchdb/couchdb-harness","owner":"pouchdb","description":"A generalized port of the CouchDB JavaScript test harness.","archived":false,"fork":false,"pushed_at":"2017-03-07T07:21:10.000Z","size":436,"stargazers_count":12,"open_issues_count":3,"forks_count":5,"subscribers_count":8,"default_branch":"master","last_synced_at":"2024-12-26T08:09:11.544Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pouchdb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-03-09T05:16:04.000Z","updated_at":"2020-11-01T05:55:20.000Z","dependencies_parsed_at":"2022-09-21T13:10:48.678Z","dependency_job_id":null,"html_url":"https://github.com/pouchdb/couchdb-harness","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pouchdb%2Fcouchdb-harness","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pouchdb%2Fcouchdb-harness/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pouchdb%2Fcouchdb-harness/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pouchdb%2Fcouchdb-harness/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pouchdb","download_url":"https://codeload.github.com/pouchdb/couchdb-harness/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":231874121,"owners_count":18439218,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-30T14:56:39.098Z","updated_at":"2024-12-30T14:56:39.665Z","avatar_url":"https://github.com/pouchdb.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CouchDB Harness\n\n\u003eA generalized port of the CouchDB JavaScript test harness.\n\n## Install\n\n```\nnpm install couchdb-harness\n```\n\n## Usage\n\n### Command Line\n\nTo run the default configuration, you can simply type,\n\n```\n$ npm start\n```\n\nBut the binary also accepts arguments to specify the port that the harness\nshould run against, as well as which files to test:\n\n```bash\n./bin/couchdb-harness -p 5984 basics all_docs\n```\n\n#### Available options\n- ``-b``: bail (a flag)\n- ``-a``: address\n- ``-p``: port\n\nAll options are further described below.\n\n### Node.js\n\n#### Examples\n\n```javascript\nvar harness = require('couchdb-harness');\nharness.run(5984, ['basics', 'all_docs'], function (exitCode) {\n  process.exit(exitCode);\n});\n```\n\n```javascript\nvar harness = require('couchdb-harness');\nharness.run('http://192.168.1.31:5985/', {bail: true}, function (code) {\n  process.exit(code);\n})\n```\n\n#### API\n\n``harness.run([addr[, opts[, callback]]])``\n\n- ``addr``: The address of the server with a CouchDB-style API to test.\n  Defaults to ``\"http://127.0.0.1:5984/\"``. If the server you want to\n  test runs on localhost and you just want to change the port, you can\n  also just pass in the port number instead.\n- ``opts``: Either an array of tests as demonstrated in the first\n  example, or a JavaScript object with the following (optional)\n  properties:\n  - ``tests``: The aforementioned array of tests. Defaults to all the\n    test files.\n  - ``bail``: When ``true``, couchdb-harness will stop running on the\n    first failure it encounters. This does not have any influence on the\n    ``exitCode``. One failure is still enough to make it non-zero.\n    Defaults to ``false``.\n  - ``callback``: Called when done running the tests. Gets one argument:\n    the exit code. It's zero when the tests all passed, otherwise\n    non-zero.\n\n## License\n\nCopyright 2013 Nick Thompson\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n   http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpouchdb%2Fcouchdb-harness","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpouchdb%2Fcouchdb-harness","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpouchdb%2Fcouchdb-harness/lists"}