Skip to content

Commit

Permalink
Improve test var naming
Browse files Browse the repository at this point in the history
  • Loading branch information
wswoodruff committed Jul 27, 2020
1 parent f7d93e1 commit c4c181f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/actions.js
Expand Up @@ -107,16 +107,16 @@ describe('Actions', () => {
expect(results).to.equal([null, { id: 1 }]);

// Extra check for special case — single array arg
const arrayResults = await store.dispatch(actionX([{ id: 3 }, { id: 4 }]));
const arrayResults = await store.dispatch(actionX([{ id: 2 }, { id: 3 }]));

expect(store.getState()).to.equal([
{ type: X.BEGIN, payload: { id: 1 }, meta: { index: null } },
{ type: X.SUCCESS, payload: { id: 1 }, meta: { index: null, original: { id: 1 } } },
{ type: X.BEGIN, payload: [[{ id: 3 }, { id: 4 }]], meta: { index: null } },
{ type: X.SUCCESS, payload: [[{ id: 3 }, { id: 4 }]], meta: { index: null, original: [[{ id: 3 }, { id: 4 }]] } }
{ type: X.BEGIN, payload: [[{ id: 2 }, { id: 3 }]], meta: { index: null } },
{ type: X.SUCCESS, payload: [[{ id: 2 }, { id: 3 }]], meta: { index: null, original: [[{ id: 2 }, { id: 3 }]] } }
]);

expect(arrayResults).to.equal([null, [[{ id: 3 }, { id: 4 }]]]);
expect(arrayResults).to.equal([null, [[{ id: 2 }, { id: 3 }]]]);
});

it('creates an async action with a handler that succeeds.', async () => {
Expand Down

0 comments on commit c4c181f

Please sign in to comment.