0

I am trying to test LWC components.js using jest. There is a setter method(Step) inside of the LWC components js file, but I am unable to test the setter method. I tried the solution using mock that the jest provided for the setter method.

enter image description here

Another approach that I tried for testing getter using jest.spyOn(ClassName, MethodName, MethodType).mockReturnValue(0);

enter image description here

Any alternative approach of jest testing for the setter method..?

0 Answers0