Skip to content
Merged
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
Next Next commit
chore(tests): fix typo "merge" to "merges" in reducer test file (#948)…
… - @yukimurasawa

Co-authored-by: yukimurasawa <[email protected]>
  • Loading branch information
yukimurasawa and yukimurasawa authored May 31, 2020
commit 2701c7064657b511aadf6935681c29e9aad79ac5
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