Advertisement
Guest User

Untitled

a guest
Feb 19th, 2019
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. it("should store selected filter", () => {
  2.  
  3. const selectedFilterData = {
  4. id: 4321,
  5. filterGroupId: 1234,
  6. filterName: "gender",
  7. text: "Male",
  8. value: "pdl_profile_gender_1"
  9. }
  10.  
  11. const action = { type: FILTER_SELECTED, data: selectedFilterData }
  12.  
  13. Reducer(filters).expect(action).toReturnState({
  14. 1234: {
  15. id: 1234,
  16. selectedFilters: [
  17. {
  18. id: 4321,
  19. filterName: "gender",
  20. text: "Male",
  21. value: "pdl_profile_gender_1"
  22. }
  23. ]
  24. }
  25. })
  26. })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement