Cypress / Quiz

Component vs E2E: Pick Your Battlefield

cy.mount or cy.visit? One mounts a lone component on a dev server, the other drives the whole app. Choosing wrong costs you speed or coverage.

Difficulty
Easy
Format
Quiz
Points
100
Estimate
9 min

// MISSION BRIEF

Your Mission

Cypress runs two kinds of war: component testing (mount one component, iterate fast) and e2e (drive the deployed app like a user). Teams that blur the line get slow component tests and shallow e2e suites.

Six questions on what each mode is for. Speed bonus active.

// FIRST CONTACT

Battle teaser

What does cy.mount actually do in a component test?

  1. ADeploys the app to a temporary server first
  2. BRenders the component to an HTML string and diffs it
  3. CVisits the production URL and scrolls to the component
  4. DRenders a single component in the browser via your project's dev server (Vite/webpack), no running application or backend required
Answers, scoring, hints, and the full battle stay sealed.

// SKILL TAGS

cypresscomponent-testingreactweb