Fix naming, add tests #5
1 changed files with 15 additions and 4 deletions
|
@ -1,6 +1,7 @@
|
||||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
import {async, ComponentFixture, TestBed} from '@angular/core/testing';
|
||||||
|
|
||||||
import { VersionComponent } from './version.component';
|
import {VersionComponent} from './version.component';
|
||||||
|
import {environment} from '../../environments/environment';
|
||||||
|
|
||||||
describe('VersionComponent', () => {
|
describe('VersionComponent', () => {
|
||||||
let component: VersionComponent;
|
let component: VersionComponent;
|
||||||
|
@ -8,9 +9,9 @@ describe('VersionComponent', () => {
|
||||||
|
|
||||||
beforeEach(async(() => {
|
beforeEach(async(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
declarations: [ VersionComponent ]
|
declarations: [VersionComponent]
|
||||||
})
|
})
|
||||||
.compileComponents();
|
.compileComponents();
|
||||||
}));
|
}));
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
|
@ -22,4 +23,14 @@ describe('VersionComponent', () => {
|
||||||
it('should create', () => {
|
it('should create', () => {
|
||||||
expect(component).toBeTruthy();
|
expect(component).toBeTruthy();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('should contain the correct version', () => {
|
||||||
|
// when executing the test, we're always running with the dev environment
|
||||||
|
expect(component.VERSION).toEqual(`${environment.appVersion} (development build)`);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should have the correct value for the "production" property', () => {
|
||||||
|
// when executing the test, we're always running with the dev environment
|
||||||
|
expect(component.PROD).toBeFalsy();
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue