title: Error using PrimeNG component in Karma
body: <p>Hey whazzup my (bk) stackerzzz.</p>
  
  <p>I got a real doozy for y'all: </p>
  
  <p>I'm using a <code>ConfirmDialog</code> component from the PrimeNG library in my angular 2 app. The component works fine when testing it out in a browser, but for some reason, using the component makes Karma explode. </p>
  
  <pre><code> Error: Error in ./ReturnFileParameterComponent class ReturnFileParameterComponent - inline template:2:4 caused by: undefined is not a constructor (evaluating 'this.documentResponsiveListener()') in C:/Users/wlaw/Desktop/ens_fits_ui/karma-shim.js (line 41475)
          ngOnDestroy@C:/Users/wlaw/Desktop/ens_fits_ui/karma-shim.js:71991:45 &lt;- webpack:///~/primeng/components/confirmdialog/confirmdialog.js:140:0
          ngOnDestroy
          destroyInternal
          destroy@C:/Users/wlaw/Desktop/ens_fits_ui/karma-shim.js:41076:34 &lt;- webpack:///~/@angular/core/bundles/core.umd.js:12361:0
          ...
  </code></pre>
  
  <p>In the <code>component.spec.ts</code> file, I imported both the dialog service and module needed for the dialog component to work:</p>
  
  <pre><code>import {
      ...
      ConfirmDialogModule,
      ConfirmationService
  } from 'primeng/primeng';
  
  
  describe('Return File Parameter Component Test', () =&gt; {
  
      beforeEach(() =&gt; {
          TestBed.configureTestingModule({
              declarations: [ReturnFileParameterComponent, HtmlUserFriendlyTimePipe, Html24HourDatePipe, DayOfWeekPipe],
              providers: [
                  ...
                  ConfirmationService,
                  ...
              ],
              imports: [
                  ...
                  ConfirmDialogModule
              ]
          });
          TestBed.compileComponents();
      });
  
  ...
  
      it('should call add on a new Return File Parameter and submit it to the service', inject(
          [ReturnFileParameterComponent, AuthHelper],
          (component: ReturnFileParameterComponent, authHelper: AuthHelper) =&gt; {
              let fixture: ComponentFixture&lt;ReturnFileParameterComponent&gt; =
                  getTestBed().createComponent(ReturnFileParameterComponent);
  
              fixture.componentInstance.ngOnInit()
                  .then(fixture.detectChanges)
                  .then(function () {
                      let newParam = fixture.componentInstance.add();
                      expect(fixture.componentInstance.selectedParam).toBe(newParam);
                      expect(fixture.componentInstance.editParam).toBe(true);
                  });
          })
      );
  });
  </code></pre>
  
  <p>But almost every test fails. </p>
  
  <p>Here is the beginning portion of the template file:</p>
  
  <pre><code>&lt;div class="ui-grid-row" id="return-parameter-table"&gt;
      &lt;h5&gt;Return File Parameters&lt;/h5&gt;
      &lt;p-growl [value]="msgs" life="3000"&gt;&lt;/p-growl&gt;
      &lt;p-confirmDialog header="Confirmation" icon="fa fa-question-circle" width="425"&gt;&lt;/p-confirmDialog&gt;
  ...
  </code></pre>
  
  <p>So basically I have no idea why its failing the tests but I get absolutely no problems using it in a browser. Any help would be greatly appreciated. </p>