Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Add tests #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

[WIP] Add tests #1

wants to merge 1 commit into from

Conversation

ewnd9
Copy link

@ewnd9 ewnd9 commented Jan 6, 2017

I've tried to incorporate similar testing approach from pouchdb-react-native, but it turned out react-native-sqlite-storage can't be mocked.

The only way I see is to test on devices / emulators, but I don't have experience with it.

What do you think? Are you interested in testing with pouchdb tests?

@craftzdog
Copy link
Owner

Thanks for your PR and I would be glad to add tests!
It may be possible to reuse the tests of pouchdb-adapter-websql-core.

@ewnd9
Copy link
Author

ewnd9 commented Jan 7, 2017

pouchdb repo uses a single test base, where different adapters are switched by environment variables in test matrix in travis-ci, so there is no specific tests for pouchdb-adapter-websql-core

@craftzdog
Copy link
Owner

It looks like the tests can't run on iOS simulator because they depend on node.js.
I think react-native-sqlite-storage shouldn't be mocked because the main purpose of the test is to make sure its stability and compatibility with pouchdb.

@craftzdog
Copy link
Owner

Maybe we can pick tests from pouchdb/tests/integration/ after removing dependencies on node.js.

@ewnd9
Copy link
Author

ewnd9 commented Mar 11, 2017

Node.js shouldn't the case since pouchdb is tested in browsers too (via sauce labs)

@craftzdog
Copy link
Owner

Sorry I forgot to mention that though, unfortunately mocha doesn't work inside React Native app.
mocha is used outside of the app in every use case I found.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants