Jump to content

Connect Leeroopedia MCP: Equip your AI agents to search best practices, build plans, verify code, diagnose failures, and look up hyperparameter defaults.

Principle:Nightwatchjs Nightwatch Component Test Execution

From Leeroopedia
Knowledge Sources
Domains Testing, Component_Testing, CLI
Last Updated 2026-02-12 00:00 GMT

Overview

A specialized test execution mode that starts a development server, renders components in isolation, and runs component-level tests via a CLI flag.

Description

Component Test Execution extends the standard test execution pipeline with an additional component-specific phase: starting a development server (Vite or Webpack) that bundles and serves individual components. The --component CLI flag activates this mode, switching the test runner from navigating to URLs to rendering components in the browser via the dev server.

Usage

Use this execution mode when running component tests. Always include the --component flag to differentiate from E2E test execution.

Theoretical Basis

The component test execution pipeline extends the standard pipeline:

  1. Start dev server (Vite/Webpack) to bundle components
  2. Parse CLI arguments with --component flag
  3. Initialize browser session
  4. For each test: Render component via plugin → Execute test → Collect results
  5. Stop dev server and report results

Related Pages

Implemented By

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment