fix: lint
This commit is contained in:
@@ -1,7 +1,5 @@
|
|||||||
{
|
{
|
||||||
"permissions": {
|
"permissions": {
|
||||||
"allow": [
|
"allow": ["Bash(npx tsc *)"]
|
||||||
"Bash(npx tsc *)"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -173,7 +173,9 @@ describe('HomeComponent', (): void => {
|
|||||||
|
|
||||||
it('should advance the portrait index after 125 ms', fakeAsync((): void => {
|
it('should advance the portrait index after 125 ms', fakeAsync((): void => {
|
||||||
const zone = TestBed.inject(NgZone);
|
const zone = TestBed.inject(NgZone);
|
||||||
zone.runOutsideAngular((): void => { comp.showNextPortraitHighlight(); });
|
zone.runOutsideAngular((): void => {
|
||||||
|
comp.showNextPortraitHighlight();
|
||||||
|
});
|
||||||
tick(125);
|
tick(125);
|
||||||
expect(comp.currentPortraitHighlightIndex).toBe(1);
|
expect(comp.currentPortraitHighlightIndex).toBe(1);
|
||||||
tick(125);
|
tick(125);
|
||||||
@@ -182,7 +184,9 @@ describe('HomeComponent', (): void => {
|
|||||||
|
|
||||||
it('should reset isPortraitSwitching to false after 250 ms', fakeAsync((): void => {
|
it('should reset isPortraitSwitching to false after 250 ms', fakeAsync((): void => {
|
||||||
const zone = TestBed.inject(NgZone);
|
const zone = TestBed.inject(NgZone);
|
||||||
zone.runOutsideAngular((): void => { comp.showNextPortraitHighlight(); });
|
zone.runOutsideAngular((): void => {
|
||||||
|
comp.showNextPortraitHighlight();
|
||||||
|
});
|
||||||
tick(250);
|
tick(250);
|
||||||
expect(comp.isPortraitSwitching).toBeFalse();
|
expect(comp.isPortraitSwitching).toBeFalse();
|
||||||
discardPeriodicTasks();
|
discardPeriodicTasks();
|
||||||
@@ -191,7 +195,9 @@ describe('HomeComponent', (): void => {
|
|||||||
it('should wrap portrait index from the last position back to 0', fakeAsync((): void => {
|
it('should wrap portrait index from the last position back to 0', fakeAsync((): void => {
|
||||||
comp.currentPortraitHighlightIndex = global.portraitHighlights.length - 1;
|
comp.currentPortraitHighlightIndex = global.portraitHighlights.length - 1;
|
||||||
const zone = TestBed.inject(NgZone);
|
const zone = TestBed.inject(NgZone);
|
||||||
zone.runOutsideAngular((): void => { comp.showNextPortraitHighlight(); });
|
zone.runOutsideAngular((): void => {
|
||||||
|
comp.showNextPortraitHighlight();
|
||||||
|
});
|
||||||
tick(125);
|
tick(125);
|
||||||
expect(comp.currentPortraitHighlightIndex).toBe(0);
|
expect(comp.currentPortraitHighlightIndex).toBe(0);
|
||||||
tick(125);
|
tick(125);
|
||||||
@@ -315,8 +321,8 @@ describe('HomeComponent', (): void => {
|
|||||||
document.body.appendChild(aboutEl);
|
document.body.appendChild(aboutEl);
|
||||||
|
|
||||||
const el = fixture.nativeElement as HTMLElement;
|
const el = fixture.nativeElement as HTMLElement;
|
||||||
const btn = Array.from(el.querySelectorAll('button')).find((b): boolean =>
|
const btn = Array.from(el.querySelectorAll('button')).find(
|
||||||
(b.textContent ?? '').trim() === 'About me',
|
(b): boolean => (b.textContent ?? '').trim() === 'About me',
|
||||||
);
|
);
|
||||||
btn?.click();
|
btn?.click();
|
||||||
expect(scrollSpy).toHaveBeenCalled();
|
expect(scrollSpy).toHaveBeenCalled();
|
||||||
@@ -329,8 +335,8 @@ describe('HomeComponent', (): void => {
|
|||||||
document.body.appendChild(projectsEl);
|
document.body.appendChild(projectsEl);
|
||||||
|
|
||||||
const el = fixture.nativeElement as HTMLElement;
|
const el = fixture.nativeElement as HTMLElement;
|
||||||
const btn = Array.from(el.querySelectorAll('button')).find((b): boolean =>
|
const btn = Array.from(el.querySelectorAll('button')).find(
|
||||||
(b.textContent ?? '').trim() === 'View projects',
|
(b): boolean => (b.textContent ?? '').trim() === 'View projects',
|
||||||
);
|
);
|
||||||
btn?.click();
|
btn?.click();
|
||||||
expect(scrollSpy).toHaveBeenCalled();
|
expect(scrollSpy).toHaveBeenCalled();
|
||||||
|
|||||||
@@ -177,7 +177,8 @@ describe('ImprintComponent', (): void => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('should complete 500 normalizeText calls within 20 ms', (): void => {
|
it('should complete 500 normalizeText calls within 20 ms', (): void => {
|
||||||
const input = 'Ulmenstra\u00DFe \u00F6sterreich \u00E4hnlich \u00FCberall \u00C4gypten \u00DCbung';
|
const input =
|
||||||
|
'Ulmenstra\u00DFe \u00F6sterreich \u00E4hnlich \u00FCberall \u00C4gypten \u00DCbung';
|
||||||
const start = performance.now();
|
const start = performance.now();
|
||||||
for (let i = 0; i < 500; i++) {
|
for (let i = 0; i < 500; i++) {
|
||||||
comp.normalizeText(input);
|
comp.normalizeText(input);
|
||||||
|
|||||||
Reference in New Issue
Block a user