<commit_before>/* tslint:disable:no-unused-variable */

import {
  beforeEach, beforeEachProviders,
  describe, xdescribe,
  expect, it, xit,
  async, inject
} from '@angular/core/testing';
import { Title } from '@angular/platform-browser';
import { AppComponent } from './app.component';

beforeEachProviders(() => [AppComponent]);

describe('App: Luskydive', () => {
  it('should create the app', inject([AppComponent], (app: AppComponent) => {
    expect(app).toBeTruthy();
  }));

  it('appends the website title when setting the document title', () => {
    let mockedTitleService = new Title();
    let component = new AppComponent(mockedTitleService);

    component.setTitle('Test');

    expect(mockedTitleService.getTitle()).toEqual('Test - Leeds University Skydivers');
  });

  it('reverts to the website title when a blank itle is given', () => {
    let mockedTitleService = new Title();
    let component = new AppComponent(mockedTitleService);

    component.setTitle('Test');
    expect(mockedTitleService.getTitle()).toEqual('Test - Leeds University Skydivers');

    component.setTitle('');
    expect(mockedTitleService.getTitle()).toEqual('Leeds University Skydivers');
  });

  it('reverts to the website title when an undefined itle is given', () => {
    let mockedTitleService = new Title();
    let component = new AppComponent(mockedTitleService);

    component.setTitle('Test');
    expect(mockedTitleService.getTitle()).toEqual('Test - Leeds University Skydivers');

    component.setTitle(undefined);
    expect(mockedTitleService.getTitle()).toEqual('Leeds University Skydivers');
  });
});<commit_msg>Fixed test.<commit_after>/* tslint:disable:no-unused-variable */

import {
  beforeEach, beforeEachProviders,
  describe, xdescribe,
  expect, it, xit,
  async, inject
} from '@angular/core/testing';
import { Title } from '@angular/platform-browser';
import { AppComponent } from './app.component';

beforeEachProviders(() => [AppComponent]);

describe('App: Luskydive', () => {
  it('should create the app', inject([AppComponent], (app: AppComponent) => {
    expect(app).toBeTruthy();
  }));

  it('appends the website title when setting the document title', () => {
    let mockedTitleService = new Title();
    let component = new AppComponent();

    component.setTitle('Test');

    expect(mockedTitleService.getTitle()).toEqual('Test - Leeds University Skydivers');
  });

  it('reverts to the website title when a blank itle is given', () => {
    let mockedTitleService = new Title();
    let component = new AppComponent();

    component.setTitle('Test');
    expect(mockedTitleService.getTitle()).toEqual('Test - Leeds University Skydivers');

    component.setTitle('');
    expect(mockedTitleService.getTitle()).toEqual('Leeds University Skydivers');
  });

  it('reverts to the website title when an undefined itle is given', () => {
    let mockedTitleService = new Title();
    let component = new AppComponent();

    component.setTitle('Test');
    expect(mockedTitleService.getTitle()).toEqual('Test - Leeds University Skydivers');

    component.setTitle(undefined);
    expect(mockedTitleService.getTitle()).toEqual('Leeds University Skydivers');
  });
});
{'fraction_non_alphanumeric': 0.1466376089663761, 'fraction_numerical': 0.0, 'mean_word_length': 4.686725663716814, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 15, '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': '1352205', 'n_tokens_mistral': 917, 'n_tokens_neox': 904, 'n_words': 225}