Created
May 23, 2019 21:47
-
-
Save krishna-acondy/b12511c8c032e1a12cf0e8dd55903c0c to your computer and use it in GitHub Desktop.
Angular Unit Testing - Creating Test Modules
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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