Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

applicantWithProcessesReducer.test.js 883B

1234567891011121314151617181920212223242526272829303132
  1. import reducer from "../../../../store/reducers/processes/applicantWithProcessesReducer";
  2. import expect from "expect";
  3. import {
  4. setApplicant,
  5. setApplicantError
  6. } from "../../../../store/actions/processes/applicantAction";
  7. import { mockState } from "../../../../mockState";
  8. describe("createPattern reducer", () => {
  9. it("should return the initial state", () => {
  10. expect(reducer(undefined, {})).toEqual({
  11. applicant: {},
  12. errorMessage: "",
  13. });
  14. });
  15. it("should set the state error", () => {
  16. expect(reducer(undefined, setApplicantError("Error"))).toEqual({
  17. applicant: {},
  18. errorMessage: "Error",
  19. });
  20. });
  21. it("should set the state success", () => {
  22. expect(
  23. reducer(undefined, setApplicant(mockState.candidate.candidate))
  24. ).toEqual({
  25. applicant: mockState.candidate.candidate,
  26. errorMessage: "",
  27. });
  28. });
  29. });