Skip to content

Commit

Permalink
Fix some linting and testing issues
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisMBarr committed Oct 5, 2024
1 parent 805780c commit 4430228
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/app/app.component.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { DOCUMENT } from '@angular/common';
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { RouterTestingModule } from '@angular/router/testing';
import { provideRouter, RouterLink, RouterLinkActive, RouterOutlet } from '@angular/router';

import { AboutComponent } from './about/about.component';
import { AppComponent } from './app.component';
Expand All @@ -16,8 +16,9 @@ describe('AppComponent', () => {

beforeEach(() => {
TestBed.configureTestingModule({
imports: [RouterTestingModule],
imports: [RouterOutlet, RouterLink, RouterLinkActive],
declarations: [AppComponent, HelpComponent, AboutComponent, ConvertComponent, DonateButtonComponent, DragAndDropFilesDirective],
providers: [provideRouter([])],
});

fixture = TestBed.createComponent(AppComponent);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable @typescript-eslint/no-deprecated -- TS selects the wrong overload and says it deprecated. It's not */
import { ComponentFixture, fakeAsync, TestBed, tick } from '@angular/core/testing';
import { By } from '@angular/platform-browser';
import * as fileSaver from 'file-saver';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export class DownloadDisplayComponent {

onClickDownloadFiles(): void {
for (const outputFile of this.outputFileList) {
// eslint-disable-next-line @typescript-eslint/no-deprecated -- TS selects the wrong overload and says it deprecated. It's not
fileSaver.saveAs(
new File(['\ufeff' + outputFile.outputContent], outputFile.fileName, {
type: 'text/plain',
Expand All @@ -36,6 +37,7 @@ export class DownloadDisplayComponent {
type: 'blob',
})
.then((zipContent: Blob) => {
// eslint-disable-next-line @typescript-eslint/no-deprecated -- TS selects the wrong overload and says it deprecated. It's not
fileSaver.saveAs(
zipContent,
`LyricConverter (${this.outputFileList.length.toString()} files).zip`,
Expand Down

0 comments on commit 4430228

Please sign in to comment.