We might be running in a node process without global.testAdminUserInfo
This commit is contained in:
parent
97800e35b1
commit
f958052c1b
|
@ -298,14 +298,10 @@ module.exports = {
|
|||
|
||||
testRetrieveAccount() {
|
||||
return new Promise((resolve, reject) => {
|
||||
if (!isNodeProcess) {
|
||||
if (!isNodeProcess || !global.testAdminUserInfo) {
|
||||
resolve();
|
||||
}
|
||||
|
||||
if (!global.testAdminUserInfo) {
|
||||
reject("Test requires an admin user");
|
||||
}
|
||||
|
||||
Realm.Sync.User.login('http://localhost:9080', global.testAdminUserInfo.username, global.testAdminUserInfo.password, (error, user) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
|
@ -338,14 +334,10 @@ module.exports = {
|
|||
|
||||
testRetrieveNotExistingAccount() {
|
||||
return new Promise((resolve, reject) => {
|
||||
if (!isNodeProcess) {
|
||||
if (!isNodeProcess || !global.testAdminUserInfo) {
|
||||
resolve();
|
||||
}
|
||||
|
||||
if (!global.testAdminUserInfo) {
|
||||
reject("Test requires an admin user");
|
||||
}
|
||||
|
||||
Realm.Sync.User.login('http://localhost:9080', global.testAdminUserInfo.username, global.testAdminUserInfo.password, (error, user) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
|
@ -427,4 +419,3 @@ module.exports = {
|
|||
}, */
|
||||
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue