Skip to content

Commit 1782f92

Browse files
author
Scott Prue
committed
Update test descriptions
1 parent b7d4821 commit 1782f92

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

test/unit/firebaseConnect.spec.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ describe('firebaseConnect', () => {
3636
expect(leaf).to.have.prop('pass', 'through')
3737
})
3838

39-
it('enebles watchers on mount', async () => {
39+
it('enables watchers on mount', async () => {
4040
const { dispatch } = createContainer({
4141
hoc: withFirebaseConnect,
4242
additionalComponentProps: { dynamic: 'start' }
@@ -51,7 +51,7 @@ describe('firebaseConnect', () => {
5151
).to.be.true
5252
})
5353

54-
it('disables watchers on unmount', async () => {
54+
it('dispatches "@@reactReduxFirebase/UNSET_LISTENER" action when listeners are detached on unmount', async () => {
5555
const { wrapper, dispatch } = createContainer({
5656
hoc: withFirebaseConnect,
5757
additionalComponentProps: { dynamic: 'start' }
@@ -67,7 +67,7 @@ describe('firebaseConnect', () => {
6767
).to.be.true
6868
})
6969

70-
it('does not change watchers props changes that do not change listener paths', async () => {
70+
it('does not dispatch new actions for props changes which do not impact listener paths', async () => {
7171
const { wrapper, dispatch } = createContainer({
7272
hoc: withFirebaseConnect,
7373
additionalComponentProps: { dynamic: 'start' }

test/unit/firestoreConnect.spec.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,11 @@ describe('firestoreConnect', () => {
1818
expect(component).to.have.lengthOf(1)
1919
})
2020

21-
it('disables watchers on unmount', () => {
21+
// it('disables watchers on unmount', () => {
22+
// TODO: write logic to confirm that watchers on signleton are updated
23+
// })
24+
25+
it('dispatches "@@reduxFirestore/UNSET_LISTENER" action when listeners are detached on unmount', () => {
2226
const { wrapper, dispatch } = createContainer({ hoc: withFirestoreConnect })
2327
wrapper.unmount()
2428
expect(
@@ -32,7 +36,7 @@ describe('firestoreConnect', () => {
3236
).to.be.true
3337
})
3438

35-
it('does not change watchers with props changes that do not change listener paths', async () => {
39+
it('does not dispatch new actions for props changes which do not impact listener paths', async () => {
3640
const { wrapper, dispatch } = createContainer({ hoc: withFirestoreConnect })
3741
wrapper.setState({ test: 'somethingElse' })
3842
expect(

0 commit comments

Comments
 (0)