[tests][database] add database helpers

This commit is contained in:
Salakar 2018-04-22 00:00:29 +01:00
parent 4284551632
commit 94afa546ae
1 changed files with 17 additions and 0 deletions

View File

@ -0,0 +1,17 @@
const CONTENTS = require('./content');
module.exports = {
setDatabaseContents() {
const database = firebaseAdmin.database();
return Promise.all([
database.ref('tests/types').set(CONTENTS.DEFAULT),
database.ref('tests/priority').setWithPriority(
{
foo: 'bar',
},
666
),
database.ref('tests/query').set(CONTENTS.QUERY),
]);
},
};