Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Env variables with JSON are modified #1348

@ps-aux

Description

@ps-aux
  • Operating System: Ubuntu 17.04
  • Cypress Version: 2.0.2
  • Browser Version: Chrome 61

Is this a Feature or Bug?

Bug or maybe feature

Current behavior:

JSON passed in env variable is modified

Desired behavior:

value of env variable should be passed unmodified

How to reproduce:

Run with env variable

npx cypress open --env token='{"a":"5", "b":{"c":"x"}}'
console.log(Cypress.env('token'))

Result in the browser console
"a":"5"| "b":{"c":"x"}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions