Cypress · Junior · Question 5 of 75

What does setting baseUrl in the Cypress config allow?

Show the answer

Correct answer: Writing cy.visit('/login') with relative paths

Explanation

A base URL also makes Cypress check the server is up before the run, and it's easy to change per environment.

Further reading

Problem with a question

Cypress · Junior · question 5

Test yourself

Take the Cypress · Junior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz