don’t run retrieveAccount tests on RN
This commit is contained in:
parent
4a499464eb
commit
6a284c94b1
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
@ -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");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue