mirror of
https://github.com/status-im/realm-js.git
synced 2025-01-11 14:54:33 +00:00
Merge branch 'al-sync-user-tests' of https://github.com/realm/realm-js into al-sync-user-tests
This commit is contained in:
commit
a53e802df3
@ -458,6 +458,8 @@ void RealmClass<T>::clear_test_state(ContextType ctx, ObjectType this_object, si
|
|||||||
for(auto &user : SyncManager::shared().all_users()) {
|
for(auto &user : SyncManager::shared().all_users()) {
|
||||||
user->log_out();
|
user->log_out();
|
||||||
}
|
}
|
||||||
|
SyncManager::shared().reset_for_testing();
|
||||||
|
SyncManager::shared().configure_file_system(default_realm_file_directory(), SyncManager::MetadataMode::NoEncryption);
|
||||||
#endif
|
#endif
|
||||||
delete_all_realms();
|
delete_all_realms();
|
||||||
}
|
}
|
||||||
|
@ -27,13 +27,7 @@ const userTests = require('../js/user-tests');
|
|||||||
describe('SyncTests', () => {
|
describe('SyncTests', () => {
|
||||||
jasmine.DEFAULT_TIMEOUT_INTERVAL = 30000;
|
jasmine.DEFAULT_TIMEOUT_INTERVAL = 30000;
|
||||||
beforeEach(() => Realm.clearTestState());
|
beforeEach(() => Realm.clearTestState());
|
||||||
afterEach(() => {
|
afterEach(() => Realm.clearTestState());
|
||||||
Realm.clearTestState();
|
|
||||||
let users = Realm.Sync.User.all;
|
|
||||||
Object.keys(users).forEach((identity) => {
|
|
||||||
users[identity].logout();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
for (const testName in userTests) {
|
for (const testName in userTests) {
|
||||||
it(testName, (done) => {
|
it(testName, (done) => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user