How help-me-mom/ng-mocks works
Project type and purpose
• This is a mono-repo Angular library named “ng-mocks” for mocking Angular Components, Directives, Pipes, Modules, Services, and Tokens in tests. It ships as an NPM package, provides a Docusaurus-based documentation site, and includes a comprehensive test suite (unit, e2e, examples).
File structure
• Top-level configuration: CI (.circleci/config.yml), lint/prettier/eslint, Husky hooks, Docker ignore, build scripts (webpack.config.js).
• libs/ng-mocks/: the core library source, organized into sub-directories by feature (common, mock-builder, mock-component, etc.).
• docs/: Docusaurus site source (config, sidebars, markdown articles, static assets).
• examples/: small Angular test projects illustrating API usage.
• e2e/, tests-e2e/: end-to-end test projects against various Angular versions and test runners (Jest, Karma).
• tests/, tests-failures/, tests-performance/: unit and integration tests covering edge cases, performance, regressions.
• Root scripts: compose.yml, compose.sh for Docker development; test.sh, test.ts for local runs; package.json, tsconfig.json for build and publishing.
README for additional insights
• The library integrates with Angular TestBed, supports Jasmine and Jest, Ivy and View-Engine, Standalone Components.
• It references API entry points: MockBuilder, MockRender, ngMocks.* methods.
• It highlights global default-mock configuration and auto-spying features.