Ignite UI for Angular
March 27, 2026 · View on GitHub
Quick-reference card for the core test commands for the main igniteui-angular library plus schematics, styles, and i18n suites.
Prerequisites
- Run
npm installat the repo root. - Schematics tests normally run from source and do not require a build first. Only run
npm run build:schematicsandnpm run build:migrationswhen you specifically want to validate the compiled schematics or migrations output. - For performance tests: run
npm run build:libfirst, or at minimumnpm run build:styles, becausetest:lib:perfloadsdist/igniteui-angular/styles/igniteui-angular.css.
Test Runner
- Karma + Jasmine for all library unit tests.
- Karma configs live in
projects/igniteui-angular/karma*.conf.js. - Coverage reports are written to
coverage/.
Choosing the Right Command
| Scenario | Command |
|---|---|
| All library tests (slow — runs everything) | npm run test:lib |
| Flat grid tests only | npm run test:lib:grid |
| Tree grid tests only | npm run test:lib:tgrid |
| Hierarchical grid tests only | npm run test:lib:hgrid |
| Pivot grid tests only | npm run test:lib:pgrid |
| All non-grid tests (components, directives, services) | npm run test:lib:others |
| Watch mode (re-runs on file changes, for dev loop) | npm run test:lib:watch |
| Performance tests | npm run test:lib:perf |
| Schematics + migrations | npm run test:schematics |
| Sass/style logic | npm run test:styles |
| i18n resource validation | npm run test:i18n |
Decision Guide
- Working on a grid component? → Use the matching grid command (
test:lib:grid,test:lib:tgrid,test:lib:hgrid, ortest:lib:pgrid). - Working on a non-grid component or directive? → Use
test:lib:others. - Iterating quickly during development? → Use
test:lib:watch. - Edited a migration or schematic? → Use
test:schematics. Build first only if you also need to validate compiled output. - Running performance tests? → Build first (
build:libor at leastbuild:styles), then usetest:lib:perf. - Changed Sass theme logic? → Use
test:styles. - Changed i18n resource strings? → Use
test:i18n. - Final verification before marking work complete? → Use
test:lib(full suite).
Karma Configs
| Config file | Used by |
|---|---|
karma.conf.js | test:lib (all tests) |
karma.grid.conf.js | test:lib:grid |
karma.tree-grid.conf.js | test:lib:tgrid |
karma.hierarchical-grid.conf.js | test:lib:hgrid |
karma.pivot-grid.conf.js | test:lib:pgrid |
karma.non-grid.conf.js | test:lib:others |
karma.watch.conf.js | test:lib:watch |
karma.test-perf.conf.js | test:lib:perf (performance) |
All configs are in projects/igniteui-angular/.
Key Paths
| Path | Purpose |
|---|---|
projects/igniteui-angular/test-utils/ | Shared test helpers and utilities |
projects/igniteui-angular/src/test.ts | Karma test entry point |
coverage/ | Code coverage output |
Related Skills
igniteui-angular-build— Building the libraryigniteui-angular-linting— Linting code and styles