[database][wip] on/off logic refactor - heavily still wip so things still to change

This commit is contained in:
Salakar
2017-08-14 11:05:49 +01:00
parent 0675aa076d
commit f1709970e9
13 changed files with 574 additions and 459 deletions

View File

@@ -22,10 +22,11 @@ import priorityTests from './priorityTests';
import DatabaseContents from '../../support/DatabaseContents';
const testGroups = [
issueSpecificTests, factoryTests, keyTests, parentTests, childTests, rootTests,
pushTests, onTests, onValueTests, onChildAddedTests, offTests, onceTests, updateTests,
removeTests, setTests, transactionTests, queryTests, refTests, isEqualTests,
priorityTests,
// issueSpecificTests, factoryTests, keyTests, parentTests, childTests, rootTests,
// pushTests, onTests, onValueTests, onChildAddedTests, offTests, onceTests, updateTests,
// removeTests, setTests, transactionTests, queryTests, refTests, isEqualTests,
// priorityTests,
onValueTests, onChildAddedTests, offTests,
];
function registerTestSuite(testSuite) {

View File

@@ -97,6 +97,7 @@ function onTests({ fdescribe, context, it, firebase, tryCatch }) {
await new Promise((resolve) => {
ref.on('value', (snapshot) => {
console.log('>>> SNAP',snapshot.val())
callback(snapshot.val());
resolve();
});