mirror of
https://github.com/status-im/realm-js.git
synced 2025-01-11 14:54:33 +00:00
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); }
|
function node_require(module) { return require(module); }
|
||||||
|
|
||||||
// If on node, run the async tests
|
// If on node, run the async tests
|
||||||
const isNodeProcess = typeof process === 'object' && process + '' === '[object process]'
|
global.isNodeProcess = typeof process === 'object' && process + '' === '[object process]'
|
||||||
if (isNodeProcess) {
|
if (global.isNodeProcess) {
|
||||||
TESTS.AsyncTests = node_require('./async-tests');
|
TESTS.AsyncTests = node_require('./async-tests');
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -75,7 +75,7 @@ exports.registerTests = function(tests) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
exports.prepare = function(done) {
|
exports.prepare = function(done) {
|
||||||
if (!isNodeProcess || global.testAdminUserInfo) {
|
if (!global.isNodeProcess || global.testAdminUserInfo) {
|
||||||
done();
|
done();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -297,6 +297,10 @@ module.exports = {
|
|||||||
|
|
||||||
testRetrieveAccount() {
|
testRetrieveAccount() {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
|
if (!global.isNodeProcess) {
|
||||||
|
resolve();
|
||||||
|
}
|
||||||
|
|
||||||
if (!global.testAdminUserInfo) {
|
if (!global.testAdminUserInfo) {
|
||||||
reject("Test requires an admin user");
|
reject("Test requires an admin user");
|
||||||
}
|
}
|
||||||
@ -333,6 +337,10 @@ module.exports = {
|
|||||||
|
|
||||||
testRetrieveNotExistingAccount() {
|
testRetrieveNotExistingAccount() {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
|
if (!global.isNodeProcess) {
|
||||||
|
resolve();
|
||||||
|
}
|
||||||
|
|
||||||
if (!global.testAdminUserInfo) {
|
if (!global.testAdminUserInfo) {
|
||||||
reject("Test requires an admin user");
|
reject("Test requires an admin user");
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user