-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #340 from BellumGens/test-coverage
test(*): more test coverage work
- Loading branch information
Showing
30 changed files
with
6,119 additions
and
6,832 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,49 @@ | ||
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; | ||
|
||
import { BaseComponent } from './base.component'; | ||
import { BaseDirective } from './base.component'; | ||
import { RouterTestingModule } from '@angular/router/testing'; | ||
import { Component } from '@angular/core'; | ||
import { Meta, Title } from '@angular/platform-browser'; | ||
import { ActivatedRoute } from '@angular/router'; | ||
|
||
describe('BaseComponent', () => { | ||
let component: BaseComponent; | ||
let fixture: ComponentFixture<BaseComponent>; | ||
let component: BaseDirective; | ||
let fixture: ComponentFixture<BaseDirective>; | ||
|
||
beforeEach(waitForAsync(() => { | ||
TestBed.configureTestingModule({ | ||
imports: [ | ||
imports: [ | ||
RouterTestingModule, | ||
BaseComponent | ||
] | ||
}) | ||
TestComponent | ||
] | ||
}) | ||
.compileComponents(); | ||
})); | ||
|
||
beforeEach(() => { | ||
fixture = TestBed.createComponent(BaseComponent); | ||
fixture = TestBed.createComponent(TestComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
expect(component['_title']).toBe('Bellum Gens: Premier Gaming and Esports Events Organizer'); | ||
expect(component['_twitterTitle']).toBe('Bellum Gens: Premier Gaming and Esports Events Organizer'); | ||
expect(component['_description']).toBe('Bellum Gens is a premier gaming and esports events organizer in Bulgaria and the Balkans region. If you want to tap into esports we can help!'); | ||
expect(component['_twitterDescription']).toBe('Bellum Gens is a premier gaming and esports events organizer in Bulgaria and the Balkans region.'); | ||
expect(component['_image']).toBe('/assets/avatar_BG_blood.png'); | ||
}); | ||
}); | ||
|
||
@Component({ | ||
selector: 'app-test', | ||
standalone: true, | ||
template: '<div>Test component</div>', | ||
imports: [BaseDirective] | ||
}) | ||
export class TestComponent extends BaseDirective { | ||
constructor(title: Title, meta: Meta, activeRoute: ActivatedRoute) { | ||
super(title, meta, activeRoute); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.