0

I have a POST API that returns the response as a string.

when I tried mocking as browser.mock('**/validate').respond('SUCCESS', { statusCode: 200 });

It's not getting mocked instead original API is hit

Can someone help me in this??.

questionar
  • 274
  • 2
  • 18

1 Answers1

0

Have you tried using WireMock Service?

More info: https://webdriver.io/docs/wdio-wiremock-service/

gonpeche
  • 99
  • 5