<commit_before>import {TestBed} from '@angular/core/testing';
import {NgModule, Component, Type} from '@angular/core';
import {provideRoutes} from '@angular/router';
import {RouterTestingModule} from '@angular/router/testing';
import {PROVIDERS} from './mocks';

import {App} from '../editor/app';
import {routes} from '../editor/routes';
import {MapModule} from '../editor/modules/map.module';
import {AaribaModule} from '../editor/modules/aariba.module';
import {ProfileModule} from '../editor/modules/profile.module';
import {SharedModule} from '../editor/components/shared.module';

// Override all components
[AaribaModule, ProfileModule, MapModule, SharedModule].forEach(module => {
    let annot: NgModule = Reflect.getOwnMetadata('annotations', module)[0];
    for (let component of (annot.declarations as Type<any>[])) {
        let comp: Component = Reflect.getOwnMetadata('annotations', component)[0];
        if (comp.templateUrl !== undefined) {
            comp.template = comp.templateUrl;
            comp.templateUrl = undefined;
        }
    }
});


describe('App', () => {

    beforeEach(() => {
        TestBed.configureTestingModule({
            imports: [
                RouterTestingModule,
                ProfileModule,
                AaribaModule,
                MapModule,
                SharedModule,
            ],
            declarations: [App],
            providers: [
                ...PROVIDERS,
                provideRoutes(routes)
            ]
        });
        let comp: Component = Reflect.getOwnMetadata('annotations', App)[0];
        TestBed.overrideComponent(App, {set: {template: comp.templateUrl, templateUrl: undefined}});
    });

    afterEach(() => {
        TestBed.resetTestingModule();
    });

    it('should also be able to test', () => {
        expect(true).toBe(true);
    });

    it('should have a router', (done) => {
        TestBed.compileComponents().then(() => {
            let app = TestBed.createComponent(App);
            app.detectChanges();
            expect(app.debugElement.componentInstance.router).toBeDefined();
            done();
        });
    });
});
<commit_msg>Fix travis.<commit_after>import {TestBed} from '@angular/core/testing';
import {NgModule, Component, Type} from '@angular/core';
import {provideRoutes} from '@angular/router';
import {RouterTestingModule} from '@angular/router/testing';
import {PROVIDERS} from './mocks';

import {App} from '../editor/app';
import {routes} from '../editor/routes';
import {MapModule} from '../editor/modules/map.module';
import {AaribaModule} from '../editor/modules/aariba.module';
import {ProfileModule} from '../editor/modules/profile.module';
import {RunnerModule} from '../editor/modules/runner.module';
import {SharedModule} from '../editor/components/shared.module';

// Override all components
[AaribaModule, RunnerModule, ProfileModule, MapModule, SharedModule].forEach(module => {
    let annot: NgModule = Reflect.getOwnMetadata('annotations', module)[0];
    for (let component of (annot.declarations as Type<any>[])) {
        let comp: Component = Reflect.getOwnMetadata('annotations', component)[0];
        if (comp.templateUrl !== undefined) {
            comp.template = comp.templateUrl;
            comp.templateUrl = undefined;
        }
    }
});


describe('App', () => {

    beforeEach(() => {
        TestBed.configureTestingModule({
            imports: [
                RouterTestingModule,
                ProfileModule,
                AaribaModule,
                RunnerModule,
                MapModule,
                SharedModule,
            ],
            declarations: [App],
            providers: [
                ...PROVIDERS,
                provideRoutes(routes)
            ]
        });
        let comp: Component = Reflect.getOwnMetadata('annotations', App)[0];
        TestBed.overrideComponent(App, {set: {template: comp.templateUrl, templateUrl: undefined}});
    });

    afterEach(() => {
        TestBed.resetTestingModule();
    });

    it('should also be able to test', () => {
        expect(true).toBe(true);
    });

    it('should have a router', (done) => {
        TestBed.compileComponents().then(() => {
            let app = TestBed.createComponent(App);
            app.detectChanges();
            expect(app.debugElement.componentInstance.router).toBeDefined();
            done();
        });
    });
});

{'fraction_non_alphanumeric': 0.14712539610683567, 'fraction_numerical': 0.001358080579447714, 'mean_word_length': 2.509928514694202, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '65147', 'n_tokens_mistral': 1212, 'n_tokens_neox': 1173, 'n_words': 253}