pouchdb-community / pouchdb-adapter-fs

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

Test setup #4

Closed gr2m closed 8 years ago

gr2m commented 8 years ago

closes #2

I copied all integration tests from PouchDB@5.4.5 and made adjustments to make them run. I had to skip a few tests, it would be great if we could review them. The test setup is not ideal as we’d need to keep it updated manually with new PouchDB versions, but it’s a good start?

Ideally PouchDB’s monorepo would release an integration test script with each PouchDB release that plugin & adapter developers can use to test their creations :)

nolanlawson commented 8 years ago

I'm fine with copy-pasta'ing tests for now. Every project I've ever worked on that tried to "share" tests (e.g. LevelDOWN & friends) eventually became an unmaintainable mess of environment variables, commented-out tests, etc. etc.

FWIW this is also the strategy I did for worker-pouch and socket-pouch. Far too difficult to try to share tests; copy-pasta tastes so good in comparison! 🍝

nolanlawson commented 8 years ago

So yeah :+1:

gr2m commented 8 years ago

Can you please active this repo on Travis? Or make me admin (maybe for both this repo and fsdown)?

nolanlawson commented 8 years ago

All the oldStyle/newStyle stuff BTW is only needed for test.migration.js, which tests LevelDB migrations. Not necessary for this project.

nolanlawson commented 8 years ago

Actually @gr2m you can just remove migration, prefix, issue9**, and http test files. All those tests don't really apply to custom adapters.