You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

test.ts 753B

12345678910111213141516171819202122232425
  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: {
  9. context(path: string, deep?: boolean, filter?: RegExp): {
  10. keys(): string[];
  11. <T>(id: string): T;
  12. };
  13. };
  14. // First, initialize the Angular testing environment.
  15. getTestBed().initTestEnvironment(
  16. BrowserDynamicTestingModule,
  17. platformBrowserDynamicTesting()
  18. );
  19. // Then we find all the tests.
  20. const context = require.context('./', true, /\.spec\.ts$/);
  21. // And load the modules.
  22. context.keys().map(context);