OpenProject is the leading open source project management software.
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.
 
 
 
 
 
 
openproject/frontend/src/test.ts

37 lines
1.0 KiB

// This file is required by karma.conf.js and loads recursively all the .spec and framework files
// Require the reflect ES7 polyfill for JIT
import 'zone.js'; // Included with Angular CLI.
import 'core-js/es/reflect';
import 'zone.js/testing';
import { getTestBed } from '@angular/core/testing';
import {
BrowserDynamicTestingModule,
platformBrowserDynamicTesting,
} from '@angular/platform-browser-dynamic/testing';
import { GlobalI18n } from 'core-app/core/i18n/i18n.service';
import { I18nShim } from './test/i18n-shim';
require('expose-loader?_!lodash');
declare const require:any;
declare global {
export interface Window {
I18n:GlobalI18n;
}
}
// Declare global I18n shim
window.I18n = new I18nShim();
// First, initialize the Angular testing environment.
getTestBed().initTestEnvironment(
BrowserDynamicTestingModule,
platformBrowserDynamicTesting(),
);
// Then we find all the tests.
const context = require.context('./', true, /\.spec\.ts$/);
// And load the modules.
context.keys().map(context);