It does that by injecting a mock XHR object in the Fauxton page, which converts all requests made by Fauxton into CouchDB request objects. These are then converted to PouchDB method calls by pouchdb-route. The result is a CouchDB response object, which is returned by the mock xhr object as the response to the request.
npm install #first time only npm test
First, make sure the
/fauxton directory contains the result of a build
There are different ways to build PouchDB-Fauxton. The basic one is:
npm install #first time only npm run build
/fauxton directory somewhere on a web server, and that's it!