# help-me-mom/ng-mocks

Angular testing library for mocking components, directives, pipes, services and facilitating TestBed setup

Repository: https://github.com/help-me-mom/ng-mocks
Canonical: https://ross.abutalabs.com/products/ng-mocks
Homepage: https://www.npmjs.com/package/ng-mocks
Language: TypeScript
License: MIT
License Family: permissive
Topics: angular, test, testing, mock, mocking, component, directive, pipe, provider, service, testbed, frontend, front-end, jest, jasmine, enzyme, how-to
Last push: 2026-09-02T21:06:57+00:00

## Health v2 (maintenance only)
Score: 95/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 100, release rhythm 87, longevity 100
- inputs: {"age_days": 3126, "days_push": 0, "days_rel": 9, "gap_med": 42.0, "n_releases_24m": 15}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1156, forks 119 (observed 2026-09-03T02:15:12.659997+00:00)

## What it is
ng-mocks is an Angular testing library that mocks components, directives, pipes, modules, services, and tokens while reducing TestBed boilerplate. It supports Angular 5 through 22 with Jasmine, Jest, and Vitest.

## Use cases
- mock angular components in unit tests
- simplify angular testbed setup
- mock services and providers in angular tests
- reduce boilerplate in angular spec files
- test angular standalone components
- replace child components with mocks in angular tests

## When to choose
- you write unit tests for Angular apps and want easy mocking of declarations
- you want to cut TestBed boilerplate in Angular specs
- you use Jest, Jasmine, or Vitest with Angular

## When to avoid
- you are not building with Angular
- you need end-to-end browser testing rather than unit tests

## Facets
- artifact type: library
- maturity: active
- function: mocking, testing, e2e-testing
- domain: testing, frontend, web-development, developer-tools
- platform: cross-platform
- tags: angular, testbed, jasmine, jest, vitest, typescript, nodejs

## Member repositories
- help-me-mom/ng-mocks (main) score 95

## Provenance
- Observed fields: from GitHub, fetched 2026-09-03T02:15:12.659997+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T06:32:13.116961+00:00, confidence not recorded.
  - readme: https://github.com/help-me-mom/ng-mocks (fetched 2026-09-03T02:15:12.659997+00:00, sha 41bada14651e)
- Data as of 2026-08-30T08:39:29.467469+00:00.
