Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/kevinrodriguezmorales/siget/llms.txt

Use this file to discover all available pages before exploring further.

The ng test command runs the Siget unit test suite using Vitest through the @angular/build:unit-test builder. Vitest is a fast, Vite-native test runner that integrates natively with the Angular build pipeline, providing instant feedback during development. The jsdom environment is included in the project’s dev dependencies to simulate a real browser DOM inside the Node.js test process.

Synopsis

ng test [project] [options]
npm test

Options

OptionTypeDefaultDescription
--watchbooleantrue in devRun tests in watch mode, re-running on file changes
--includestring[]Glob patterns selecting which test files to include
--excludestring[]Glob patterns for test files to exclude

Examples

# Start the test runner in interactive watch mode
ng test

# Run the full suite once and exit (ideal for CI)
ng test --watch false

Test Builder

Siget’s test architect target in angular.json uses @angular/build:unit-test:
"test": {
  "builder": "@angular/build:unit-test"
}
The builder delegates test execution to Vitest and automatically discovers *.spec.ts files throughout the src/ tree. No additional configuration file is required — the Angular build system wires up the TypeScript compiler and jsdom environment for you.
Siget uses Vitest ^4.0.8 (declared in devDependencies) together with jsdom ^28.0.0. jsdom provides a simulated browser DOM so components that rely on browser APIs can be tested without launching a real browser.
When running tests in a CI environment, pass --watch false to ensure the test runner executes the suite once and exits with the appropriate status code instead of waiting indefinitely for file changes:
ng test --watch false

Build docs developers (and LLMs) love