Skip to content
Merged
Changes from all commits
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
Fix typo in test file
  • Loading branch information
yukimurasawa committed May 30, 2020
commit 03e6e9e14c8630a1ba056b3c27a37d03f42c79f9
8 changes: 4 additions & 4 deletions test/unit/reducer.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -219,15 +219,15 @@ describe('reducer', () => {
expect(firebaseReducer({}, action)).to.deep.equal(initialState)
})

it('merge data to empty state under path', () => {
it('merges data to empty state under path', () => {
action = { type: actionTypes.MERGE, path, data: exampleData }
expect(firebaseReducer({}, action).data).to.deep.equal({
...initialState.data,
[path]: exampleData
})
})

it('merge data to empty state under paths that end in a number', () => {
it('merges data to empty state under paths that end in a number', () => {
action = { type: actionTypes.MERGE, path: 'test/123', data: exampleData }
expect(firebaseReducer({}, action).data).to.deep.equal({
...initialState.data,
Expand Down Expand Up @@ -273,15 +273,15 @@ describe('reducer', () => {
})
})

it('merge data to path with already existing value of null', () => {
it('merges data to path with already existing value of null', () => {
initialData = { data: { test: { [childKey]: null } } }
action = { type: actionTypes.MERGE, path: childPath, data: newData }
expect(firebaseReducer(initialData, action).data).to.deep.equal(
setWith(Object, childDotPath, newData, {})
)
})

it('merge data to path with already existing parent of null', () => {
it('merges data to path with already existing parent of null', () => {
initialData = { data: { test: null } }
action = { type: actionTypes.MERGE, path: childPath, data: exampleData }
expect(firebaseReducer(initialData, action).data).to.deep.equal(
Expand Down