[tests][*] removed focus from misc tests
This commit is contained in:
parent
678abdf0e6
commit
b068b4ff42
|
@ -1,5 +1,5 @@
|
|||
function childTests({ fdescribe, it, context, firebase }) {
|
||||
fdescribe('ref().child', () => {
|
||||
function childTests({ describe, it, context, firebase }) {
|
||||
describe('ref().child', () => {
|
||||
context('when passed a shallow path', () => {
|
||||
it('returns correct child ref', () => {
|
||||
// Setup
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import DatabaseContents from '../../support/DatabaseContents';
|
||||
|
||||
function factoryTests({ fdescribe, it, firebase }) {
|
||||
fdescribe('ref()', () => {
|
||||
function factoryTests({ describe, it, firebase }) {
|
||||
describe('ref()', () => {
|
||||
it('returns root reference when provided no path', () => {
|
||||
// Setup
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
function isEqualTests({ fdescribe, before, it, firebase }) {
|
||||
fdescribe('ref().isEqual()', () => {
|
||||
function isEqualTests({ describe, before, it, firebase }) {
|
||||
describe('ref().isEqual()', () => {
|
||||
before(() => {
|
||||
this.ref = firebase.native.database().ref('tests/types');
|
||||
});
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import should from 'should';
|
||||
import DatabaseContents from '../../support/DatabaseContents';
|
||||
|
||||
function issueTests({ fdescribe, it, context, firebase }) {
|
||||
fdescribe('issue_100', () => {
|
||||
function issueTests({ describe, it, context, firebase }) {
|
||||
describe('issue_100', () => {
|
||||
context('array-like values should', () => {
|
||||
it('return null in returned array at positions where a key is missing', async () => {
|
||||
// Setup
|
||||
|
@ -18,7 +18,7 @@ function issueTests({ fdescribe, it, context, firebase }) {
|
|||
});
|
||||
});
|
||||
|
||||
fdescribe('issue_108', () => {
|
||||
describe('issue_108', () => {
|
||||
context('filters using floats', () => {
|
||||
it('return correct results', async () => {
|
||||
// Setup
|
||||
|
@ -66,7 +66,7 @@ function issueTests({ fdescribe, it, context, firebase }) {
|
|||
});
|
||||
});
|
||||
|
||||
fdescribe('issue_171', () => {
|
||||
describe('issue_171', () => {
|
||||
context('non array-like values should', () => {
|
||||
it('return as objects', async () => {
|
||||
// Setup
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
function keyTests({ fdescribe, it, firebase }) {
|
||||
fdescribe('ref().key', () => {
|
||||
function keyTests({ describe, it, firebase }) {
|
||||
describe('ref().key', () => {
|
||||
it('returns null for root ref', () => {
|
||||
// Setup
|
||||
|
||||
|
|
|
@ -3,8 +3,8 @@ import sinon from 'sinon';
|
|||
|
||||
import DatabaseContents from '../../support/DatabaseContents';
|
||||
|
||||
function offTests({ fdescribe, it, xcontext, context, firebase }) {
|
||||
fdescribe('ref().off()', () => {
|
||||
function offTests({ describe, it, xcontext, context, firebase }) {
|
||||
describe('ref().off()', () => {
|
||||
it('doesn\'t unbind children callbacks', async () => {
|
||||
// Setup
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import 'should-sinon';
|
||||
import Promise from 'bluebird';
|
||||
|
||||
export default function onChildAddedTests({ fdescribe, beforeEach, afterEach, it, firebase }) {
|
||||
fdescribe('ref().on(\'child_added\')', () => {
|
||||
fdescribe('the snapshot', () => {
|
||||
export default function onChildAddedTests({ describe, beforeEach, afterEach, it, firebase }) {
|
||||
describe('ref().on(\'child_added\')', () => {
|
||||
describe('the snapshot', () => {
|
||||
let ref;
|
||||
let childRef;
|
||||
let childVal;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import 'should-sinon';
|
||||
|
||||
function onTests({ fdescribe, it, firebase, context }) {
|
||||
fdescribe('ref().on()', () => {
|
||||
function onTests({ describe, it, firebase, context }) {
|
||||
describe('ref().on()', () => {
|
||||
// Observed Web API Behaviour
|
||||
context('when no eventName is provided', () => {
|
||||
it('then raises an error', () => {
|
||||
|
|
|
@ -4,8 +4,8 @@ import Promise from 'bluebird';
|
|||
|
||||
import DatabaseContents from '../../../support/DatabaseContents';
|
||||
|
||||
function onTests({ fdescribe, context, it, firebase, tryCatch }) {
|
||||
fdescribe('ref().on(\'value\')', () => {
|
||||
function onTests({ describe, context, it, firebase, tryCatch }) {
|
||||
describe('ref().on(\'value\')', () => {
|
||||
// Documented Web API Behaviour
|
||||
it('returns the success callback', () => {
|
||||
// Setup
|
||||
|
|
|
@ -3,8 +3,8 @@ import 'should-sinon';
|
|||
|
||||
import DatabaseContents from '../../support/DatabaseContents';
|
||||
|
||||
function onceTests({ fdescribe, firebase, it, tryCatch }) {
|
||||
fdescribe('ref().once()', () => {
|
||||
function onceTests({ describe, firebase, it, tryCatch }) {
|
||||
describe('ref().once()', () => {
|
||||
it('returns a promise', () => {
|
||||
// Setup
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
function parentTests({ fdescribe, context, it, firebase }) {
|
||||
fdescribe('ref().parent', () => {
|
||||
function parentTests({ describe, context, it, firebase }) {
|
||||
describe('ref().parent', () => {
|
||||
context('on the root ref', () => {
|
||||
it('returns null', () => {
|
||||
// Setup
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import DatabaseContents from '../../support/DatabaseContents';
|
||||
|
||||
function setTests({ fdescribe, it, firebase }) {
|
||||
fdescribe('ref().priority', () => {
|
||||
function setTests({ describe, it, firebase }) {
|
||||
describe('ref().priority', () => {
|
||||
it('setPriority() should correctly set a priority for all non-null values', async () => {
|
||||
await Promise.map(Object.keys(DatabaseContents.DEFAULT), async (dataRef) => {
|
||||
// Setup
|
||||
|
|
|
@ -3,8 +3,8 @@ import 'should-sinon';
|
|||
|
||||
import DatabaseContents from '../../support/DatabaseContents';
|
||||
|
||||
function pushTests({ fdescribe, it, firebase }) {
|
||||
fdescribe('ref().push()', () => {
|
||||
function pushTests({ describe, it, firebase }) {
|
||||
describe('ref().push()', () => {
|
||||
it('returns a ref that can be used to set value later', async () => {
|
||||
// Setup
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import 'should-sinon';
|
||||
import Promise from 'bluebird';
|
||||
|
||||
function queryTests({ fdescribe, it, firebase, tryCatch }) {
|
||||
fdescribe('ref query', () => {
|
||||
function queryTests({ describe, it, firebase, tryCatch }) {
|
||||
describe('ref query', () => {
|
||||
it('orderByChild().equalTo()', () => {
|
||||
return new Promise((resolve, reject) => {
|
||||
const successCb = tryCatch((snapshot) => {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
function refTests({ fdescribe, it, firebase }) {
|
||||
fdescribe('ref().ref', () => {
|
||||
function refTests({ describe, it, firebase }) {
|
||||
describe('ref().ref', () => {
|
||||
it('returns the reference', () => {
|
||||
// Setup
|
||||
const ref = firebase.native.database().ref();
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import DatabaseContents from '../../support/DatabaseContents';
|
||||
|
||||
function removeTests({ fdescribe, it, firebase }) {
|
||||
fdescribe('ref().remove()', () => {
|
||||
function removeTests({ describe, it, firebase }) {
|
||||
describe('ref().remove()', () => {
|
||||
it('returns a promise', () => {
|
||||
// Setup
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
function rootTests({ fdescribe, it, context, firebase }) {
|
||||
fdescribe('ref().root', () => {
|
||||
function rootTests({ describe, it, context, firebase }) {
|
||||
describe('ref().root', () => {
|
||||
context('when called on a non-root reference', () => {
|
||||
it('returns root ref', () => {
|
||||
// Setup
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import DatabaseContents from '../../support/DatabaseContents';
|
||||
|
||||
function setTests({ fdescribe, it, xit, firebase }) {
|
||||
fdescribe('ref.set()', () => {
|
||||
function setTests({ describe, it, xit, firebase }) {
|
||||
describe('ref.set()', () => {
|
||||
it('returns a promise', async () => {
|
||||
// Setup
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import Promise from 'bluebird';
|
||||
|
||||
function onTests({ fdescribe, it, firebase, tryCatch }) {
|
||||
fdescribe('ref.transaction()', () => {
|
||||
function onTests({ describe, it, firebase, tryCatch }) {
|
||||
describe('ref.transaction()', () => {
|
||||
it('increments a value on a ref', () => {
|
||||
return new Promise((resolve, reject) => {
|
||||
let valueBefore = 1;
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import Promise from 'bluebird';
|
||||
import DatabaseContents from '../../support/DatabaseContents';
|
||||
|
||||
function updateTests({ fdescribe, it, firebase }) {
|
||||
fdescribe('ref().update()', () => {
|
||||
function updateTests({ describe, it, firebase }) {
|
||||
describe('ref().update()', () => {
|
||||
it('returns a promise', () => {
|
||||
// Setup
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import RNfirebase from './../../../firebase/firebase';
|
||||
|
||||
function storageTests({ describe, fdescribe, it, firebase, tryCatch }) {
|
||||
fdescribe('ref(:path)', () => {
|
||||
function storageTests({ describe, it, firebase, tryCatch }) {
|
||||
describe('ref(:path)', () => {
|
||||
it('toString() should return the correct bucket path to the file', () => {
|
||||
const app = RNfirebase.app();
|
||||
firebase.native.storage().ref('/uploadNope.jpeg').toString()
|
||||
|
|
Loading…
Reference in New Issue