Cypress · Middle · Question 21 of 77

Where are cy.task handlers registered?

Show the answer

Correct answer: In setupNodeEvents in the Cypress config

Explanation

on('task', { seedDb() { ... } }) runs in Node, where database clients and the file system are available.

Further reading

Problem with a question

Cypress · Middle · question 21

Test yourself

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

Take this quiz