test.ts 682 B

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