https://cypress.io logo
Clear Service Property in beforeEach
# i-need-help
b
I am using Cypress as Component Test for Angular. The component uses a service that changes a BehaviourSubject. After each test i need to reset the BehaviourSubject -> how can i access it? The Service is injected in the Constructor (but as private). In the cy-spec file i have it as provider but not as mock. Is there a way to call a clear method on the service? Or do i have to use a mock?
In general cypress can not access private members/methods/providers?!