Skip to content

Commit 814611f

Browse files
committed
added a test for changeImagePath
1 parent 91c34a9 commit 814611f

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/actions/__tests__/actionCreator.test.tsx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,13 @@ describe('Testing All of The Action Creators', () => {
3737
};
3838
expect(actions.changeTutorial(payld)).toEqual(expectedAction);
3939
});
40+
41+
it('changeImagePath returns a proper action', () => {
42+
const payld = 'test/path';
43+
const expectedAction = {
44+
type: types.CHANGE_IMAGE_SOURCE,
45+
payload: { imageSource: payld }
46+
};
47+
expect(actions.changeImagePath(payld)).toEqual(expectedAction);
48+
});
4049
});

0 commit comments

Comments
 (0)