Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
PR updates based on comments.
  • Loading branch information
Marek Olszewski committed Oct 20, 2017
commit ad04ba7c77690e022b1479a5166bf0c7464a113e
6 changes: 3 additions & 3 deletions src/createFirebaseInstance.js
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ export const createFirebaseInstance = (firebase, configs, dispatch) => {
storageActions.deleteFile(dispatch, firebase, { path, dbPath })

/**
* @description Connect. Similar to the firebaseConnect Higher Order
* @description firebaseWatch. Similar to the firebaseConnect Higher Order
* Component but presented as a function. Useful for populating your redux
* state without React, e.g., for service side rendering.
* @param {Array} watchArray - Array of objects or strings for paths to sync
Expand All @@ -251,7 +251,7 @@ export const createFirebaseInstance = (firebase, configs, dispatch) => {
* your watchArray generating function.
* @return {Promise}
*/
const connect = (watchArray, props) => {
const firebaseWatch = (watchArray, props) => {
const inputAsFunc = createCallable(watchArray)
const prevData = inputAsFunc(props, firebase)
const firebaseEvents = getEventsFromInput(prevData)
Expand Down Expand Up @@ -430,7 +430,7 @@ export const createFirebaseInstance = (firebase, configs, dispatch) => {
unWatchEvent,
reloadAuth,
linkWithCredential,
connect
firebaseWatch
}

return Object.assign(firebase, helpers, { helpers })
Expand Down
6 changes: 3 additions & 3 deletions tests/unit/enhancer.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,9 @@ describe('Compose', () => {
})
})

describe('connect', () => {
it('starts connect', async () => {
await store.firebase.connect(['test'])
describe('firebaseWatch', () => {
it('starts firebaseWatch', async () => {
await store.firebase.firebaseWatch(['test'])
expect(store.firebase.ref('test')).to.be.an.object
})
})
Expand Down