From 55864b744acbf33df42cb8d97a5ad6901a6b7c0c Mon Sep 17 00:00:00 2001 From: Elliot Hesp Date: Tue, 23 May 2017 13:18:39 +0100 Subject: [PATCH] Update tests --- tests/src/tests/config/configTests.js | 9 ++++++--- tests/src/tests/config/index.js | 2 +- tests/src/tests/storage/storageTests.js | 8 ++++---- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/tests/src/tests/config/configTests.js b/tests/src/tests/config/configTests.js index c86e0a28..2dd331c2 100644 --- a/tests/src/tests/config/configTests.js +++ b/tests/src/tests/config/configTests.js @@ -1,8 +1,9 @@ -function configTests({ tryCatch, before, fdescribe, it, firebase }) { +function configTests({ before, describe, it, firebase }) { /* Remote config service values = { foo: true, foobar: 'barbaz', + numvalue: 0, } */ before(() => { @@ -13,7 +14,7 @@ function configTests({ tryCatch, before, fdescribe, it, firebase }) { }); }); - fdescribe('Config', () => { + describe('Config', () => { it('it should fetch and activate config', () => { return firebase.native.config().fetch() .then(() => { @@ -39,17 +40,19 @@ function configTests({ tryCatch, before, fdescribe, it, firebase }) { }); it('it should get multiple values by an array of keys', () => { - return firebase.native.config().getValues(['foo', 'bar', 'foobar']) + return firebase.native.config().getValues(['foo', 'bar', 'foobar', 'numvalue']) .then((result) => { result.should.be.a.Object(); result.should.have.keys('foo', 'bar', 'foobar'); const fooValue = result.foo.val(); const barValue = result.bar.val(); const foobarValue = result.foobar.val(); + const numvalueValue = result.numvalue.val(); fooValue.should.be.equal(true); barValue.should.be.equal('baz'); foobarValue.should.be.equal('barbaz'); + numvalueValue.should.be.equal(0); return Promise.resolve(); }); diff --git a/tests/src/tests/config/index.js b/tests/src/tests/config/index.js index 407290e0..ede34ec0 100644 --- a/tests/src/tests/config/index.js +++ b/tests/src/tests/config/index.js @@ -2,7 +2,7 @@ import firebase from '../../firebase'; import TestSuite from '../../../lib/TestSuite'; import configTests from './configTests'; -const suite = new TestSuite('Crash', 'firebase.config()', firebase); +const suite = new TestSuite('Remote Config', 'firebase.config()', firebase); // bootstrap tests suite.addTests(configTests); diff --git a/tests/src/tests/storage/storageTests.js b/tests/src/tests/storage/storageTests.js index 104b27e9..2e3953de 100644 --- a/tests/src/tests/storage/storageTests.js +++ b/tests/src/tests/storage/storageTests.js @@ -1,5 +1,5 @@ -function storageTests({ xdescribe, it, firebase, tryCatch }) { - xdescribe('downloadFile()', () => { +function storageTests({ describe, it, firebase, tryCatch }) { + describe('downloadFile()', () => { it('it should error on download file if permission denied', () => { return new Promise((resolve, reject) => { const successCb = tryCatch(() => { @@ -33,7 +33,7 @@ function storageTests({ xdescribe, it, firebase, tryCatch }) { }); }); - xdescribe('putFile()', () => { + describe('putFile()', () => { it('it should error on upload if permission denied', () => { return new Promise((resolve, reject) => { const successCb = tryCatch(() => { @@ -69,7 +69,7 @@ function storageTests({ xdescribe, it, firebase, tryCatch }) { }); }); - xdescribe('on()', () => { + describe('on()', () => { it('should listen to upload state', () => { return new Promise((resolve, reject) => { const path = `${firebase.native.storage.Native.DOCUMENT_DIRECTORY_PATH}/ok.jpeg`;