ng-mocks icon indicating copy to clipboard operation
ng-mocks copied to clipboard

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

Results 78 ng-mocks issues
Sort by recently updated
recently updated
newest added

### Describe the feature or problem you'd like to solve Provide an example in the documentation for how to test functional route guards without using NgModule ### Proposed solution People...

enhancement

HI there! ### Description of the bug I try to set the return value of a DI'ed pipe's `transform()` function, but it doesn't. I also `expect()` the function `.toHaveBeenCalled()`, but...

bug

### Description of the bug I have thousands of `MockMiddleware{Index}` not being cleaned up. ### An example of the bug ~~Unfortunately I don't have a sample atm~~ https://github.com/cheng93/ng-mocks-reset ### Expected...

bug

### Discussed in https://github.com/help-me-mom/ng-mocks/discussions/7842 Originally posted by **cheng93** January 5, 2024 Hi I'm wondering why we don't remove the ngModule definition from `ngMocksUniverse.global`. I believe it's causing me some memory...

https://github.com/Tallyb/ng-mocks-vitest @satanTime _Originally posted by @Tallyb in https://github.com/help-me-mom/ng-mocks/discussions/5064#discussioncomment-7876580_

### Discussed in https://github.com/help-me-mom/ng-mocks/discussions/7792 Originally posted by **kpeters-cbsi** December 23, 2023 What's the recommended way of mocking a ComponentStore instance? I have the following Component: ```ts import { Component, OnInit...

### Discussed in https://github.com/help-me-mom/ng-mocks/discussions/7577 Originally posted by **StavNoyAkur8** November 22, 2023 [Strict mode](https://ng-mocks.sudo.eu/api/MockBuilder#strict-mode) is a great feature. It is activated when passing 2+ parameters - typically the tested component and...

https://stackoverflow.com/questions/77329862/ngmocks-error-ng0204-cant-resolve-all-parameters-for-pinresolver ### ngMocks .... Error: NG0204: Can't resolve all parameters for PinResolver: (?, ?) i am getting error within test... i use ngMocks... i used test from this documentation as...

bug

### Description of the bug Tests fail after updating to 14.12.0 this is for a standalone component using angular 17 for a standalone component. works with 14.11.0 ### An example:...

bug

Given I use a signal in an html template like below ``` @Component({ selector: 'app-component', template: '{{ count() }}', }) export class AppComponent{ count = signal(3); } ``` And I...

enhancement