Skip to content

Error when passing baseUrl with value null or undefined to cypress.run #2160

Open
@guilhermebruzzi

Description

@guilhermebruzzi

Current behavior:

When you pass a config to cypress.run and it contains the baseUrl param with the value null (which is its default value: https://docs.cypress.io/guides/references/configuration.html#Global) or undefined it throws the error:

Expected 'baseUrl' to be a fully qualified URL (starting with http:// or https://). Instead the value was: "null"

Desired behavior:

Should execute the tests just like if you didn't pass the baseUrl param.

Steps to reproduce:

This is a code similar to the one I tried to run:

const cypress = require('cypress')

cypress
      .run({
        headed: false,
        watchForFileChanges: false,
        config: {
          record: false,
          video: false,
          baseUrl: null, // <- the problem
        },
      })

Versions

cypress: 3.0.2
Operating system: macOS High Sierra (10.13.5)

Metadata

Metadata

Assignees

No one assigned

    Labels

    clitype: featureNew feature that does not currently exist

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions