Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
throw new InvalidModuleError(mod);
}
const modClass = mod as Type;
const {imports, declarations, exports, entryComponents, providers, schemas} = getNgModuleAnnotations(modClass);
const mockedModule: NgModule = {
imports: ngMock(imports, setup),
declarations: ngMock(declarations, setup),
exports: collapseModuleWithProviders(ngMock(exports, setup)),
entryComponents: ngMock(entryComponents, setup),
providers: providers.map(p => mockProvider(p, setup)),
schemas,
};
@NgModule(mockedModule)
@MockOf(modClass)
class MockModule {}
return setup.mockCache.add(mod, MockModule) as TModule;
}