unit tests for @core/application

This commit is contained in:
Lorenz Hilpert
2021-01-18 14:32:59 +01:00
parent 5f6cbf18a1
commit 5d0e3ca3b2
4 changed files with 222 additions and 195 deletions

View File

@@ -1,4 +1,5 @@
import { TestBed } from '@angular/core/testing';
import { isObservable } from 'rxjs';
import { ApplicationService } from './application.service';
@@ -6,11 +7,26 @@ describe('ApplicationService', () => {
let service: ApplicationService;
beforeEach(() => {
TestBed.configureTestingModule({});
TestBed.configureTestingModule({
providers: [ApplicationService],
});
service = TestBed.inject(ApplicationService);
});
it('should be created', () => {
expect(service).toBeTruthy();
});
describe('activatedProcessId', () => {
it('should return the processId', () => {
service.setActivatedProcessId(100);
expect(service.activatedProcessId).toEqual(100);
});
});
describe('activatedProcessId$', () => {
it('should return an observable', () => {
expect(isObservable(service.activatedProcessId$)).toBeTruthy();
});
});
});

View File

@@ -1 +1,2 @@
[0112/142456.599:ERROR:directory_reader_win.cc(43)] FindFirstFile: Das System kann den angegebenen Pfad nicht finden. (0x3)
[0118/143206.568:ERROR:directory_reader_win.cc(43)] FindFirstFile: Das System kann den angegebenen Pfad nicht finden. (0x3)

397
package-lock.json generated
View File

File diff suppressed because it is too large Load Diff

View File

@@ -93,6 +93,7 @@
"codelyzer": "^5.1.2",
"husky": "^4.2.3",
"jasmine-core": "~3.5.0",
"jasmine-marbles": "^0.6.0",
"jasmine-spec-reporter": "~5.0.0",
"karma": "~5.0.0",
"karma-chrome-launcher": "~3.1.0",