test.ts 642 B

1234567891011121314151617181920
  1. // This file is required by karma.conf.js and loads recursively all the .spec and framework files
  2. import 'zone.js/dist/zone-testing';
  3. import { getTestBed } from '@angular/core/testing';
  4. import {
  5. BrowserDynamicTestingModule,
  6. platformBrowserDynamicTesting
  7. } from '@angular/platform-browser-dynamic/testing';
  8. declare const require: any;
  9. // First, initialize the Angular testing environment.
  10. getTestBed().initTestEnvironment(
  11. BrowserDynamicTestingModule,
  12. platformBrowserDynamicTesting()
  13. );
  14. // Then we find all the tests.
  15. const context = require.context('./', true, /\.spec\.ts$/);
  16. // And load the modules.
  17. context.keys().map(context);