First off, install the library's dependencies:
npm install
Your CouchDB instance must be accessible at http://localhost:5984. You can specify an alternative URL by setting a SERVER_HOST environment variable.
Also remember that the CouchDB instance must be in Admin Party! CORS is automatically enabled by the test script.
CLIENT=local npm run test
# or simply
npm run test-localCLIENT=phantom npm run test
# or simply
npm run test-phantomCLIENT=node npm run test
# or simply
npm run test-nodeFirst you need to install Docker, start the daemon service, and enable access permissions to /var/run/docker.sock. As an example, on Fedora Linux you would do as root:
dnf install docker
systemctl start docker
chmod a+rw /var/run/docker.sockThen you can run the tests as user.
SERVER=couchdb:2 CLIENT=local npm run testSERVER=couchdb:1 CLIENT=local npm run testSERVER=pouchdb-server CLIENT=local npm run test