-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Remove local docs when remove is called on the database #3397
Remove local docs when remove is called on the database #3397
Conversation
Add copy of human collection with not random db name
storage.createKeyObjectStorageInstance(databaseName, collectionName + '-local', {}) | ||
]); | ||
|
||
await Promise.all([instance.remove(), localInstance.remove()]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The "fix" was to make sure the local instance was removed. If we take out localInstance.remove()
, the test fails.
} | ||
PouchDB.plugin(require('pouchdb-adapter-memory')); | ||
const db = await createRxDatabase<{ human: RxCollection<schemaObjects.HumanDocumentType> }>({ | ||
name: 'humandatabase', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is duplicated code and shouldn't really be this way. This was an easy way to quickly create the database without a different random name so that I could prove the local docs aren't removed.
I am betting the other tests that create random database names might break if they had a non-random database name.
Hi @special-character |
Thanks @pubkey, it looks like it should but I can test it out. Is this deployed in edit: oh, I see the commit a few hours ago. I can grab them from the dist and try it out |
Looks like the dist isn't actually built out from the src on master. Is there something I should do to build that? |
I started the build job when this is finished the dist folder should be up to date. |
@pubkey I got a chance to pull the dist folder into my project and try it out. As far as I can tell, it appears to work |
Thank you for testing. I will release a new version tomorrow. |
Going to close this because it was already done in the upstream repo. |
This PR contains:
Describe the problem you have without this PR
fixes: #3396
Todos