Skip to content

Instantly share code, notes, and snippets.

@krishna-acondy
Created May 23, 2019 21:47
Show Gist options
  • Save krishna-acondy/b12511c8c032e1a12cf0e8dd55903c0c to your computer and use it in GitHub Desktop.
Save krishna-acondy/b12511c8c032e1a12cf0e8dd55903c0c to your computer and use it in GitHub Desktop.
Angular Unit Testing - Creating Test Modules
export function setupTestModule<T>(moduleType: Type<T>, providers: any[] = []) {
return TestBed.configureTestingModule({
imports: [
moduleType
],
providers: providers
})
.compileComponents();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment