where does cy variable coming from in cypress

前端 未结 1 935
天涯浪人
天涯浪人 2021-01-06 10:58

I am have installed ESlint in out test project and it started to show me few errors that i need to resolve

one of the error is in cy.request(\'someURL\');

T

1条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-06 12:00

    cy is a global variable. Much like location. So really it is window.cy. You can add it to the globals in Eslint. Don't import cy from cypress.

    {
        "globals": {
            "cy": true
        }
    }
    

    0 讨论(0)
提交回复
热议问题