Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Polly: Cannot read property 'substr' of undefined #1766

Closed
hubidu opened this issue Jul 9, 2019 · 0 comments · Fixed by #1760
Closed

Polly: Cannot read property 'substr' of undefined #1766

hubidu opened this issue Jul 9, 2019 · 0 comments · Fixed by #1760

Comments

@hubidu
Copy link
Contributor

hubidu commented Jul 9, 2019

What are you trying to achieve?

I call I.mockRequest('GET', '/api/users', 200); in my test

What do you get instead?

Provide console output if related. Use --verbose mode for more details.

 Cannot read property 'substr' of undefined

  Scenario Steps:

  - I.mockRequest("GET", "/api/users", 200) at Test.Scenario (versicherungscenter\fremdvertrag-hinzufuegen\versicherungsnehmer-formular.test.js:66:5)

Details

The cause is that this.options.url is not set and therefore baseUrl is undefined on line 137 in Polly Helper.

  • CodeceptJS version: 2.2.0
  • NodeJS Version: 10.x
  • Operating System: Windows
  • Polly
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant