Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Principle:Nightwatchjs Nightwatch Component Plugin Installation

From Leeroopedia
Revision as of 17:59, 16 February 2026 by Admin (talk | contribs) (Auto-imported from principles/Nightwatchjs_Nightwatch_Component_Plugin_Installation.md)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Knowledge Sources
Domains Testing, Component_Testing, Plugin_System
Last Updated 2026-02-12 00:00 GMT

Overview

A plugin installation pattern that extends a testing framework with framework-specific component rendering capabilities via separate packages.

Description

Component Plugin Installation adds the ability to render and test individual UI components in isolation, outside of a full application context. Unlike end-to-end tests which load complete pages, component tests mount a single component with controlled props and state. This requires framework-specific adapters (React, Vue, Angular) that handle component rendering, lifecycle management, and DOM integration.

The plugin architecture keeps the core testing framework lightweight while allowing users to install only the adapters they need for their specific frontend framework.

Usage

Install the appropriate component testing plugin when you need to test individual components in isolation. Choose based on your frontend framework: @nightwatch/react for React, @nightwatch/vue for Vue, @nightwatch/angular for Angular.

Theoretical Basis

The plugin system follows the extension point pattern:

  1. Core framework provides test execution, assertions, and browser control
  2. Plugins provide framework-specific rendering (mount/render)
  3. Bundler integration (Vite/Webpack) compiles components for browser execution
  4. Dev server serves compiled components to the browser

Related Pages

Implemented By

Page Connections

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