Challenge: Writing Cypress Commands

Challenge your learning on the cypress commands by modifying the signup command.

Problem statement

It’s possible to set default function parameters in JavaScript and TypeScript. This allows us to avoid writing some of the code in our Cypress signup command, such as the following:

var username = username || 'user';

Try updating the Cypress command to see if you can leverage default function parameters.


Get hands-on with 1200+ tech skills courses.