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

(#5305) - fix pouchdb-adapter-node-websql #5305

Merged
merged 1 commit into from Jun 8, 2016
Merged

Conversation

nolanlawson
Copy link
Member

Unfortunately pouchdb-adapter-node-websql is broken due to a typo, and it wasn't caught in CI because it turns out we teeeeechnically only test pouchdb/extras/websql, which is slightly different from pouchdb-adapter-node-websql. Since I think it's silly to run an extra test for a slightly different usage, I've just fixed it manually and gonna call that good.

@@ -7,7 +7,7 @@ function NodeWebSqlPouch(opts, callback) {
websql: websql // pass node-websql in as our "openDatabase" function
}, opts);

WebSqlPouch.call(this, _opts, callback);
WebSqlPouchCore.call(this, _opts, callback);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When this wasn't calling core, it was just uselessly calling what pouchdb-adapter-websql exports, which is the PouchDB.plugin(...) code.

@nolanlawson
Copy link
Member Author

nolanlawson commented Jun 7, 2016

Actually I was wrong; the test should be using pouchdb-adapter-node-websql, it's just that our test script was incorrectly using LevelDB even with ADAPTER=websql. I've added a test to ensure it's actually testing node-websql, and I've fixed the (unrelated) error that was causing us to fall back to LevelDB instead of node-websql.

The test fails before the fix but succeeds after.

global.PouchDB = global.PouchDB.defaults({
prefix: './tmp/_pouch_'
});
delete global.PouchDB.adapters.leveldb;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

^ this was not actually working before. Instead, it was just running leveldb like normal.

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