Kamil Chmielowski
Web / Angular
Jasmine code coverage report for cv app.
You can contact with me by email: kamilchmielowski94@gmail.com or my page.
Press n or j to go to the next uncovered block, b, p or k for the previous block.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 | 1x 11x 11x 11x 20x 20x 20x 20x 11x 22x 11x 11x 11x 11x 11x 11x | import { ChangeDetectionStrategy, ChangeDetectorRef, Component, DestroyRef, OnInit } from '@angular/core'; import { CommonModule } from '@angular/common'; import { RouterLink } from '@angular/router'; import { forkJoin } from 'rxjs'; import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; import { TranslateModule } from '@ngx-translate/core'; import { BibleGallery, CvGallery, SongbookGallery, WeatherGallery } from './galleries.data'; import { environment } from '../../../environments/environment'; import { FeaturesComponent } from './features/features.component'; import { GalleryComponent } from './gallery/gallery.component'; import { GithubLanguages } from '../../services/github/github.model'; import { GithubService } from '../../services/github/github.service'; import { ProjectItemComponent } from '../home/aside/projects/project-item/project-item.component'; import { ProjectLangComponent } from './project-lang/project-lang.component'; import { SectionTitleComponent } from '../home/section-title/section-title.component'; @Component({ selector: 'app-projects', templateUrl: './projects.component.html', styleUrls: ['./projects.component.scss'], standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [ CommonModule, FeaturesComponent, GalleryComponent, ProjectItemComponent, ProjectLangComponent, RouterLink, SectionTitleComponent, TranslateModule, ], }) export class ProjectsComponent implements OnInit { readonly languages = ['cv', 'weather']; protected readonly environment = environment; protected projectsLanguages: GithubLanguages[] = []; protected get BibleGallery() { return BibleGallery; } protected get CvGallery() { return CvGallery; } protected get SongbookGallery() { return SongbookGallery; } protected get WeatherGallery() { return WeatherGallery; } private getProjectLanguages$ = forkJoin( this.languages.map(project => this.githubService.getProjectLanguages(project) .pipe(takeUntilDestroyed(this.destroyRef)) ) ); constructor( private cdr: ChangeDetectorRef, private destroyRef: DestroyRef, private githubService: GithubService, ) {} ngOnInit() { this.getProjectLanguages$.subscribe(projectsLanguages => { this.projectsLanguages = projectsLanguages; this.cdr.markForCheck() }); } } |