don’t run retrieveAccount tests on RN

This commit is contained in:
blagoev 2017-07-07 12:46:57 +03:00
parent 4a499464eb
commit 6a284c94b1
2 changed files with 11 additions and 3 deletions

View File

@ -44,8 +44,8 @@ if (Realm.Sync) {
function node_require(module) { return require(module); }
// If on node, run the async tests
const isNodeProcess = typeof process === 'object' && process + '' === '[object process]'
if (isNodeProcess) {
global.isNodeProcess = typeof process === 'object' && process + '' === '[object process]'
if (global.isNodeProcess) {
TESTS.AsyncTests = node_require('./async-tests');
}
@ -75,7 +75,7 @@ exports.registerTests = function(tests) {
};
exports.prepare = function(done) {
if (!isNodeProcess || global.testAdminUserInfo) {
if (!global.isNodeProcess || global.testAdminUserInfo) {
done();
}

View File

@ -297,6 +297,10 @@ module.exports = {
testRetrieveAccount() {
return new Promise((resolve, reject) => {
if (!global.isNodeProcess) {
resolve();
}
if (!global.testAdminUserInfo) {
reject("Test requires an admin user");
}
@ -333,6 +337,10 @@ module.exports = {
testRetrieveNotExistingAccount() {
return new Promise((resolve, reject) => {
if (!global.isNodeProcess) {
resolve();
}
if (!global.testAdminUserInfo) {
reject("Test requires an admin user");
}