title: Angular 2 unit testing - getting error Failed to load 'ng:///DynamicTestModule/module.ngfactory.js'
body: <p>I have angular 2 webpack application, all webpack,karma configuration created as per angular.io webpack guide. 
  I am not using aot.
  I am writing jasmine unit test spec to test my components.
  First I tried without async block, in that case , unit test just get execute only till fixture.detectChanges() call, code after that doesn't get executed. Seems like fixture.detectChanges call getting blocked infinitely.</p>
  
  <p>I tried by including code in async block.
  Then I get following error.
  Error:Failed to execute 'send' on 'XMLHttpRequest' : Failed to load 'ng:///DynamicTestModule​/module.ngfactory.js'</p>
  
  <hr>
  
  <p>Code without async </p>
  
  <pre><code>beforeeach(()=&gt; {
  TestBed.configureTestingModule({
  imports:[],
  declaration :[Mycomp],
  providers:[{ provide:MyService, useclass:MyMockService}]
  });
   fixture=TestBed.createComponent(Mycomp);
   console.log(' before detect changes'):
   fixture.detectChanges():
   console.log('after detect changes');// this is not getting   
      logged .. karma shows 0 of 1 executed successfully
  
   });
  </code></pre>
  
  <hr>
  
  <p>With async </p>
  
  <pre><code>  beforeeach(async(()=&gt; {
   TestBed.configureTestingModule({
    imports:[],
    declaration :[Mycomp],
    providers:[{ provide:MyService,       useclass:MyMockService}]
    });
     fixture=TestBed.createComponent(Mycomp);
      fixture.detectChanges():
    }));
  </code></pre>
  
  <p>getting error Failed to load dynamictestmodule/module.ngfactory.js</p>