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
import{Component,NgModule}from'@angular/core';import{MockBuilder,MockRender}from'ng-mocks';
@Component({selector: 'my-component',template: '',})classMyComponent{}
@NgModule({declarations: [MyComponent],exports: [MyComponent],})classMyModule{}
@Component({selector: 'my-standalone-component',standalone: true,template: '',imports: [MyModule],})classMyStandaloneComponent{}beforeEach(()=>MockBuilder(MyStandaloneComponent,null).keep(MyModule).mock(MyComponent));// Error: MockBuilder has found a missing dependency: MyModule. It means no module provides it.// Please, use the "export" flag if you want to add it explicitly. https://ng-mocks.sudo.eu/api/MockBuilder#export-flagit('creates MyStandaloneComponent',()=>{expect(()=>MockRender(MyStandaloneComponent)).not.toThrow();});
The text was updated successfully, but these errors were encountered:
The text was updated successfully, but these errors were encountered: