[tests] Fix database push test

This commit is contained in:
Chris Bianca 2017-09-21 17:38:12 +01:00
parent 264ff496a0
commit 1564973454
1 changed files with 4 additions and 3 deletions

View File

@ -61,10 +61,11 @@ function pushTests({ describe, it, firebase }) {
return ref.once('value')
.then((snapshot) => {
originalListValue = snapshot.val();
return ref.push(valueToAddToList);
newItemRef = ref.push(valueToAddToList);
return newItemRef;
})
.then((pushRef) => {
newItemRef = pushRef;
.then((val) => {
// val should be void
return newItemRef.once('value');
})
.then((snapshot) => {