You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 template: https://ng-mocks.sudo.eu/guides/routing-resolver
only difference that i can see is that i am using standalone components ... so there is no target module as in example within documentation
pls? how should i mock parameters of this resolver
describe('PinResolver:fn',()=\> {beforeEach(()=\> {returnMockBuilder(\[ActivatedRoute,RouterModule,RouterTestingModule.withRoutes(\[\]),NG_MOCKS_ROOT_PROVIDERS\]).exclude(NG_MOCKS_GUARDS).exclude(NG_MOCKS_RESOLVERS).keep(PinResolver);});it('provides data to on the route',fakeAsync(()=\> {constfixture=MockRender(RouterOutlet,{});constrouter=ngMocks.get(Router);constrouterStateSnapshot=ngMocks.get(RouterStateSnapshot);constlocation=ngMocks.get(Location);constcardsService=ngMocks.get(CardsService);constcrypto=ngMocks.get(CryptoService);consttype='pin';cardsService.getPin=()=>from(['1111']);location.pathname='/pin';if(fixture.ngZone){fixture.ngZone.run(()=>router.initialNavigation());tick();}expect(location.pathname).toEqual('/cards/103867599/pin');constel=ngMocks.find(PinComponent);constroute=ngMocks.findInstance(el,ActivatedRoute);expect(route.snapshot.data).toEqual({pin: {pinBlock: '1234',},});}));});
i try to follow ngMocks documentation but without success
The text was updated successfully, but these errors were encountered:
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 template:
https://ng-mocks.sudo.eu/guides/routing-resolver
only difference that i can see is that i am using standalone components ... so there is no target module as in example within documentation
pls? how should i mock parameters of this resolver
resolver:
test:
i try to follow ngMocks documentation but without success
The text was updated successfully, but these errors were encountered: