Skip to content

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

@hubidu

Description

@hubidu

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions