[tests][core] re-enable core app create test

This commit is contained in:
Salakar 2017-11-03 23:45:40 +00:00
parent edf8feb921
commit ba22aecff1
1 changed files with 18 additions and 17 deletions

View File

@ -25,6 +25,11 @@ const iosTestConfig = {
projectId: 'rnfirebase-b9ad4', projectId: 'rnfirebase-b9ad4',
}; };
function rand(from = 1, to = 9999) {
const r = Math.random();
return Math.floor(r * ((to - from) + from));
}
function coreTests({ describe, it }) { function coreTests({ describe, it }) {
describe('Core', () => { describe('Core', () => {
it('it should create js apps for natively initialized apps', () => { it('it should create js apps for natively initialized apps', () => {
@ -53,23 +58,19 @@ function coreTests({ describe, it }) {
return Promise.resolve(); return Promise.resolve();
}); });
// // todo move to UTILS module tests it('it should initialize dynamic apps', () => {
// it('it should provide the sdk version', () => { const name = `testscoreapp${rand()}`;
// should.equal(!!RNFirebase.utils.VERSIONS['react-native-firebase'].length, true); return RNFirebase
// return Promise.resolve(); .initializeApp(Platform.OS === 'ios' ? iosTestConfig : androidTestConfig, name)
// }); .onReady()
.then((newApp) => {
// TODO add back in when android sdk support becomes available newApp.name.should.equal(name.toUpperCase());
// it('it should initialize dynamic apps', () => { newApp.options.apiKey.should.equal((Platform.OS === 'ios' ? iosTestConfig : androidTestConfig).apiKey);
// return RNFirebase // TODO add back in when android sdk support for deleting apps becomes available
// .initializeApp(Platform.OS === 'ios' ? iosTestConfig : androidTestConfig, 'testsCoreApp') // return newApp.delete();
// .onReady() return Promise.resolve();
// .then((newApp) => { });
// newApp.name.should.equal('TESTSCOREAPP'); });
// newApp.options.apiKey.should.equal((Platform.OS === 'ios' ? iosTestConfig : androidTestConfig).apiKey);
// return newApp.delete();
// });
// });
}); });
} }