pouchdb-community / pouchdb-adapter-fs

PouchDB adapter using fsdown under the hood
Apache License 2.0
4 stars 4 forks source link

Testing: npm link .. fails for me #2

Closed gr2m closed 8 years ago

gr2m commented 8 years ago
npm link ..
npm ERR! Darwin 15.6.0
npm ERR! argv "/Users/gregor/.nvm/versions/node/v6.4.0/bin/node" "/Users/gregor/.nvm/versions/node/v6.4.0/bin/npm" "link" ".."
npm ERR! node v6.4.0
npm ERR! npm  v3.10.3

npm ERR! May not delete: /Users/gregor/Projects/pouchdb-adapter-fs/pouchdb
npm ERR! 
npm ERR! If you need help, you may report this error at:
npm ERR!     <https://github.com/npm/npm/issues>

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/gregor/Projects/pouchdb-adapter-fs/pouchdb/npm-debug.log

I suggest we add a section Testing to the README and ask people to git clone pouchdb into a different repository, install dependencies and then run npm link /path/to/pouchdb-adapter-fs and then run CLIENT_ADAPTER=pouchdb-adapter-fs npm test in the pouchdb folder?

That would be a simple first step. In general it would be nice to have a best practice for PouchDB adapter developers to test their adapter using the pouchdb test suite

gr2m commented 8 years ago

Is CLIENT_ADAPTER the right environment variable? I can’t find it anywhere in PouchDB’s source. Is it ADAPTER? But when I run npm test in the pouchdb repository it still runs the whole suite against CouchDB et all while I just want to test pouchdb-adapter-fs

nolanlawson commented 8 years ago

Yeah I added CLIENT_ADAPTER in a branch and then forgot to open up a PR. There was no easy way I could find to test this thing. Tempted to just copy-paste PouchDB's test suite into this repo and then tweak it until it works. :/

nolanlawson commented 8 years ago

Also yeah, the test suite requires CouchDB because it needs to test replication. Alternative is to test both fs as a client and as a server, but that requires pouchdb-server.