Skip to content

Instantly share code, notes, and snippets.

@georgesboris
Created October 17, 2017 16:12
Show Gist options
  • Save georgesboris/6ed773676b9814ef2b6cf842cc9f8222 to your computer and use it in GitHub Desktop.
Save georgesboris/6ed773676b9814ef2b6cf842cc9f8222 to your computer and use it in GitHub Desktop.
firebase-app - test - app flow
const { applyAction } = require('../firebase-app');
// create our local database
let db = {};
// first user signs up and creates the first post
db = applyAction(createUser, createUserPayload, db);
db = applyAction(createPost, createPostPayload, db);
db = applyAction(updatePost, updatePostPayload, db);
// a second user signs up, comments and likes the first user post
db = applyAction(createUser, createSecondUserPayload, db);
db = applyAction(commentPost, commentPostPayload, db);
db = applyAction(likePost, likePostPayload, db);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment