feat(core): allow to provide multiple default testing modules (#15054)
This can be used to e.g. add the NoopAnimationsModule by default: ``` TestBed.initTestEnvironment([ BrowserDynamicTestingModule, NoopAnimationsModule ], platformBrowserDynamicTesting()); ```
This commit is contained in:

committed by
Chuck Jazdzewski

parent
8b5c6b2732
commit
6c8638cf01
12
test-main.js
12
test-main.js
@ -66,11 +66,15 @@ System.config({
|
||||
// method and kick off Karma (Jasmine).
|
||||
System.import('@angular/core/testing')
|
||||
.then(function(coreTesting) {
|
||||
return System.import('@angular/platform-browser-dynamic/testing')
|
||||
.then(function(browserTesting) {
|
||||
return Promise
|
||||
.all([
|
||||
System.import('@angular/platform-browser-dynamic/testing'),
|
||||
System.import('@angular/platform-browser/animations')
|
||||
])
|
||||
.then(function(mods) {
|
||||
coreTesting.TestBed.initTestEnvironment(
|
||||
browserTesting.BrowserDynamicTestingModule,
|
||||
browserTesting.platformBrowserDynamicTesting());
|
||||
[mods[0].BrowserDynamicTestingModule, mods[1].NoopAnimationsModule],
|
||||
mods[0].platformBrowserDynamicTesting());
|
||||
});
|
||||
})
|
||||
.then(function() {
|
||||
|
Reference in New Issue
Block a user