From 81248619446438ea76118a2349988b8cafcf4004 Mon Sep 17 00:00:00 2001 From: Vitor Hideyoshi Date: Sat, 14 Oct 2023 23:52:49 -0300 Subject: [PATCH] Removes Unused Angular Files --- angular.json | 8 ++-- karma.conf.js | 44 ------------------- src/app/app.component.spec.ts | 31 ------------- src/app/footer/footer.component.spec.ts | 21 --------- .../header-dropdown.component.spec.ts | 22 ---------- .../callback/callback.component.spec.ts | 22 ---------- .../error-box/error-box.component.spec.ts | 22 ---------- .../header-popup/help/help.component.spec.ts | 22 ---------- .../login/login.component.spec.ts | 22 ---------- .../my-profile/my-profile.component.spec.ts | 22 ---------- .../profile-picture-picker.component.spec.ts | 22 ---------- .../signup/signup.component.spec.ts | 22 ---------- .../header-slider.component.spec.ts | 22 ---------- .../nav-slider/nav-slider.component.spec.ts | 22 ---------- .../user-slider/user-slider.component.spec.ts | 22 ---------- src/app/header/header.component.spec.ts | 22 ---------- src/app/home/home.component.spec.ts | 22 ---------- src/app/shared/auth/auth.service.spec.ts | 16 ------- .../components/popup/popup.component.spec.ts | 22 ---------- .../slider-item/slider-item.component.spec.ts | 22 ---------- .../cookie-consert.service.spec.ts | 16 ------- .../clicked-outside.directive.spec.ts | 8 ---- .../service-worker/update.service.spec.ts | 16 ------- tsconfig.spec.json | 10 ----- 24 files changed, 4 insertions(+), 496 deletions(-) delete mode 100644 karma.conf.js delete mode 100644 src/app/app.component.spec.ts delete mode 100644 src/app/footer/footer.component.spec.ts delete mode 100644 src/app/header/header-dropdown/header-dropdown.component.spec.ts delete mode 100644 src/app/header/header-popup/callback/callback.component.spec.ts delete mode 100644 src/app/header/header-popup/error-box/error-box.component.spec.ts delete mode 100644 src/app/header/header-popup/help/help.component.spec.ts delete mode 100644 src/app/header/header-popup/login/login.component.spec.ts delete mode 100644 src/app/header/header-popup/my-profile/my-profile.component.spec.ts delete mode 100644 src/app/header/header-popup/my-profile/profile-picture-picker/profile-picture-picker.component.spec.ts delete mode 100644 src/app/header/header-popup/signup/signup.component.spec.ts delete mode 100644 src/app/header/header-slider/header-slider.component.spec.ts delete mode 100644 src/app/header/header-slider/nav-slider/nav-slider.component.spec.ts delete mode 100644 src/app/header/header-slider/user-slider/user-slider.component.spec.ts delete mode 100644 src/app/header/header.component.spec.ts delete mode 100644 src/app/home/home.component.spec.ts delete mode 100644 src/app/shared/auth/auth.service.spec.ts delete mode 100644 src/app/shared/components/popup/popup.component.spec.ts delete mode 100644 src/app/shared/components/slider-item/slider-item.component.spec.ts delete mode 100644 src/app/shared/cookie-consent/cookie-consert.service.spec.ts delete mode 100644 src/app/shared/directive/clicked-outside/clicked-outside.directive.spec.ts delete mode 100644 src/app/shared/service-worker/update.service.spec.ts delete mode 100644 tsconfig.spec.json diff --git a/angular.json b/angular.json index 6c7b0c6..5ab386a 100644 --- a/angular.json +++ b/angular.json @@ -43,13 +43,13 @@ "budgets": [ { "type": "initial", - "maximumWarning": "500kb", - "maximumError": "1mb" + "maximumWarning": "1mb", + "maximumError": "1.5mb" }, { "type": "anyComponentStyle", - "maximumWarning": "2kb", - "maximumError": "4kb" + "maximumWarning": "2.5kb", + "maximumError": "5kb" } ], "fileReplacements": [ diff --git a/karma.conf.js b/karma.conf.js deleted file mode 100644 index 292752d..0000000 --- a/karma.conf.js +++ /dev/null @@ -1,44 +0,0 @@ -// Karma configuration file, see link for more information -// https://karma-runner.github.io/1.0/config/configuration-file.html - -module.exports = function (config) { - config.set({ - basePath: "", - frameworks: ["jasmine", "@angular-devkit/build-angular"], - plugins: [ - require("karma-jasmine"), - require("karma-chrome-launcher"), - require("karma-jasmine-html-reporter"), - require("karma-coverage"), - require("@angular-devkit/build-angular/plugins/karma"), - ], - client: { - jasmine: { - // you can add configuration options for Jasmine here - // the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html - // for example, you can disable the random execution with `random: false` - // or set a specific seed with `seed: 4321` - }, - clearContext: false, // leave Jasmine Spec Runner output visible in browser - }, - jasmineHtmlReporter: { - suppressAll: true, // removes the duplicated traces - }, - coverageReporter: { - dir: require("path").join( - __dirname, - "./coverage/frontend-hideyoshi.com", - ), - subdir: ".", - reporters: [{ type: "html" }, { type: "text-summary" }], - }, - reporters: ["progress", "kjhtml"], - port: 9876, - colors: true, - logLevel: config.LOG_INFO, - autoWatch: true, - browsers: ["Chrome"], - singleRun: false, - restartOnFileChange: true, - }); -}; diff --git a/src/app/app.component.spec.ts b/src/app/app.component.spec.ts deleted file mode 100644 index f3573ec..0000000 --- a/src/app/app.component.spec.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { TestBed } from '@angular/core/testing'; -import { AppComponent } from './app.component'; - -describe('AppComponent', () => { - beforeEach(async () => { - await TestBed.configureTestingModule({ - declarations: [AppComponent], - }).compileComponents(); - }); - - it('should create the app', () => { - const fixture = TestBed.createComponent(AppComponent); - const app = fixture.componentInstance; - expect(app).toBeTruthy(); - }); - - it(`should have as title 'frontend-hideyoshi.com'`, () => { - const fixture = TestBed.createComponent(AppComponent); - const app = fixture.componentInstance; - expect(app.title).toEqual('frontend-hideyoshi.com'); - }); - - it('should render title', () => { - const fixture = TestBed.createComponent(AppComponent); - fixture.detectChanges(); - const compiled = fixture.nativeElement as HTMLElement; - expect(compiled.querySelector('.content span')?.textContent).toContain( - 'frontend-hideyoshi.com app is running!', - ); - }); -}); diff --git a/src/app/footer/footer.component.spec.ts b/src/app/footer/footer.component.spec.ts deleted file mode 100644 index ce1f93c..0000000 --- a/src/app/footer/footer.component.spec.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { ComponentFixture, TestBed } from '@angular/core/testing'; - -import { FooterComponent } from './footer.component'; - -describe('FooterComponent', () => { - let component: FooterComponent; - let fixture: ComponentFixture; - - beforeEach(() => { - TestBed.configureTestingModule({ - declarations: [FooterComponent], - }); - fixture = TestBed.createComponent(FooterComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/src/app/header/header-dropdown/header-dropdown.component.spec.ts b/src/app/header/header-dropdown/header-dropdown.component.spec.ts deleted file mode 100644 index b68ab9d..0000000 --- a/src/app/header/header-dropdown/header-dropdown.component.spec.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { ComponentFixture, TestBed } from '@angular/core/testing'; - -import { HeaderDropdownComponent } from './header-dropdown.component'; - -describe('HeaderDropdownComponent', () => { - let component: HeaderDropdownComponent; - let fixture: ComponentFixture; - - beforeEach(async () => { - await TestBed.configureTestingModule({ - declarations: [HeaderDropdownComponent], - }).compileComponents(); - - fixture = TestBed.createComponent(HeaderDropdownComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/src/app/header/header-popup/callback/callback.component.spec.ts b/src/app/header/header-popup/callback/callback.component.spec.ts deleted file mode 100644 index 7b788b4..0000000 --- a/src/app/header/header-popup/callback/callback.component.spec.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { ComponentFixture, TestBed } from '@angular/core/testing'; - -import { CallbackComponent } from './callback.component'; - -describe('CallbackComponent', () => { - let component: CallbackComponent; - let fixture: ComponentFixture; - - beforeEach(async () => { - await TestBed.configureTestingModule({ - declarations: [CallbackComponent], - }).compileComponents(); - - fixture = TestBed.createComponent(CallbackComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/src/app/header/header-popup/error-box/error-box.component.spec.ts b/src/app/header/header-popup/error-box/error-box.component.spec.ts deleted file mode 100644 index 1c6e475..0000000 --- a/src/app/header/header-popup/error-box/error-box.component.spec.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { ComponentFixture, TestBed } from '@angular/core/testing'; - -import { ErrorBoxComponent } from './error-box.component'; - -describe('ErrorBoxComponent', () => { - let component: ErrorBoxComponent; - let fixture: ComponentFixture; - - beforeEach(async () => { - await TestBed.configureTestingModule({ - declarations: [ErrorBoxComponent], - }).compileComponents(); - - fixture = TestBed.createComponent(ErrorBoxComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/src/app/header/header-popup/help/help.component.spec.ts b/src/app/header/header-popup/help/help.component.spec.ts deleted file mode 100644 index 2005b87..0000000 --- a/src/app/header/header-popup/help/help.component.spec.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { ComponentFixture, TestBed } from '@angular/core/testing'; - -import { HelpComponent } from './help.component'; - -describe('HelpComponent', () => { - let component: HelpComponent; - let fixture: ComponentFixture; - - beforeEach(async () => { - await TestBed.configureTestingModule({ - declarations: [HelpComponent], - }).compileComponents(); - - fixture = TestBed.createComponent(HelpComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/src/app/header/header-popup/login/login.component.spec.ts b/src/app/header/header-popup/login/login.component.spec.ts deleted file mode 100644 index b6637ca..0000000 --- a/src/app/header/header-popup/login/login.component.spec.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { ComponentFixture, TestBed } from '@angular/core/testing'; - -import { LoginComponent } from './login.component'; - -describe('LoginComponent', () => { - let component: LoginComponent; - let fixture: ComponentFixture; - - beforeEach(async () => { - await TestBed.configureTestingModule({ - declarations: [LoginComponent], - }).compileComponents(); - - fixture = TestBed.createComponent(LoginComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/src/app/header/header-popup/my-profile/my-profile.component.spec.ts b/src/app/header/header-popup/my-profile/my-profile.component.spec.ts deleted file mode 100644 index ed5efc8..0000000 --- a/src/app/header/header-popup/my-profile/my-profile.component.spec.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { ComponentFixture, TestBed } from '@angular/core/testing'; - -import { MyProfileComponent } from './my-profile.component'; - -describe('MyProfileComponent', () => { - let component: MyProfileComponent; - let fixture: ComponentFixture; - - beforeEach(async () => { - await TestBed.configureTestingModule({ - declarations: [MyProfileComponent], - }).compileComponents(); - - fixture = TestBed.createComponent(MyProfileComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/src/app/header/header-popup/my-profile/profile-picture-picker/profile-picture-picker.component.spec.ts b/src/app/header/header-popup/my-profile/profile-picture-picker/profile-picture-picker.component.spec.ts deleted file mode 100644 index e221791..0000000 --- a/src/app/header/header-popup/my-profile/profile-picture-picker/profile-picture-picker.component.spec.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { ComponentFixture, TestBed } from '@angular/core/testing'; - -import { ProfilePicturePickerComponent } from './profile-picture-picker.component'; - -describe('ProfilePicturePickerComponent', () => { - let component: ProfilePicturePickerComponent; - let fixture: ComponentFixture; - - beforeEach(async () => { - await TestBed.configureTestingModule({ - declarations: [ProfilePicturePickerComponent], - }).compileComponents(); - - fixture = TestBed.createComponent(ProfilePicturePickerComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/src/app/header/header-popup/signup/signup.component.spec.ts b/src/app/header/header-popup/signup/signup.component.spec.ts deleted file mode 100644 index d3fe11f..0000000 --- a/src/app/header/header-popup/signup/signup.component.spec.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { ComponentFixture, TestBed } from '@angular/core/testing'; - -import { SignupComponent } from './signup.component'; - -describe('SignupComponent', () => { - let component: SignupComponent; - let fixture: ComponentFixture; - - beforeEach(async () => { - await TestBed.configureTestingModule({ - declarations: [SignupComponent], - }).compileComponents(); - - fixture = TestBed.createComponent(SignupComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/src/app/header/header-slider/header-slider.component.spec.ts b/src/app/header/header-slider/header-slider.component.spec.ts deleted file mode 100644 index a95b96f..0000000 --- a/src/app/header/header-slider/header-slider.component.spec.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { ComponentFixture, TestBed } from '@angular/core/testing'; - -import { HeaderSliderComponent } from './header-slider.component'; - -describe('HeaderSliderComponent', () => { - let component: HeaderSliderComponent; - let fixture: ComponentFixture; - - beforeEach(async () => { - await TestBed.configureTestingModule({ - declarations: [HeaderSliderComponent], - }).compileComponents(); - - fixture = TestBed.createComponent(HeaderSliderComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/src/app/header/header-slider/nav-slider/nav-slider.component.spec.ts b/src/app/header/header-slider/nav-slider/nav-slider.component.spec.ts deleted file mode 100644 index 8057e54..0000000 --- a/src/app/header/header-slider/nav-slider/nav-slider.component.spec.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { ComponentFixture, TestBed } from '@angular/core/testing'; - -import { NavSliderComponent } from './nav-slider.component'; - -describe('NavSliderComponent', () => { - let component: NavSliderComponent; - let fixture: ComponentFixture; - - beforeEach(async () => { - await TestBed.configureTestingModule({ - declarations: [NavSliderComponent], - }).compileComponents(); - - fixture = TestBed.createComponent(NavSliderComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/src/app/header/header-slider/user-slider/user-slider.component.spec.ts b/src/app/header/header-slider/user-slider/user-slider.component.spec.ts deleted file mode 100644 index 98dce97..0000000 --- a/src/app/header/header-slider/user-slider/user-slider.component.spec.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { ComponentFixture, TestBed } from '@angular/core/testing'; - -import { UserSliderComponent } from './user-slider.component'; - -describe('UserSliderComponent', () => { - let component: UserSliderComponent; - let fixture: ComponentFixture; - - beforeEach(async () => { - await TestBed.configureTestingModule({ - declarations: [UserSliderComponent], - }).compileComponents(); - - fixture = TestBed.createComponent(UserSliderComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/src/app/header/header.component.spec.ts b/src/app/header/header.component.spec.ts deleted file mode 100644 index 4dd632c..0000000 --- a/src/app/header/header.component.spec.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { ComponentFixture, TestBed } from '@angular/core/testing'; - -import { HeaderComponent } from './header.component'; - -describe('HeaderComponent', () => { - let component: HeaderComponent; - let fixture: ComponentFixture; - - beforeEach(async () => { - await TestBed.configureTestingModule({ - declarations: [HeaderComponent], - }).compileComponents(); - - fixture = TestBed.createComponent(HeaderComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/src/app/home/home.component.spec.ts b/src/app/home/home.component.spec.ts deleted file mode 100644 index e3d3847..0000000 --- a/src/app/home/home.component.spec.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { ComponentFixture, TestBed } from '@angular/core/testing'; - -import { HomeComponent } from './home.component'; - -describe('HomeComponent', () => { - let component: HomeComponent; - let fixture: ComponentFixture; - - beforeEach(async () => { - await TestBed.configureTestingModule({ - declarations: [HomeComponent], - }).compileComponents(); - - fixture = TestBed.createComponent(HomeComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/src/app/shared/auth/auth.service.spec.ts b/src/app/shared/auth/auth.service.spec.ts deleted file mode 100644 index 3730a50..0000000 --- a/src/app/shared/auth/auth.service.spec.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { TestBed } from '@angular/core/testing'; - -import { AuthService } from './auth.service'; - -describe('AuthService', () => { - let service: AuthService; - - beforeEach(() => { - TestBed.configureTestingModule({}); - service = TestBed.inject(AuthService); - }); - - it('should be created', () => { - expect(service).toBeTruthy(); - }); -}); diff --git a/src/app/shared/components/popup/popup.component.spec.ts b/src/app/shared/components/popup/popup.component.spec.ts deleted file mode 100644 index bf3233d..0000000 --- a/src/app/shared/components/popup/popup.component.spec.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { ComponentFixture, TestBed } from '@angular/core/testing'; - -import { PopupComponent } from './popup.component'; - -describe('PopupComponent', () => { - let component: PopupComponent; - let fixture: ComponentFixture; - - beforeEach(async () => { - await TestBed.configureTestingModule({ - declarations: [PopupComponent], - }).compileComponents(); - - fixture = TestBed.createComponent(PopupComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/src/app/shared/components/slider-item/slider-item.component.spec.ts b/src/app/shared/components/slider-item/slider-item.component.spec.ts deleted file mode 100644 index 160b845..0000000 --- a/src/app/shared/components/slider-item/slider-item.component.spec.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { ComponentFixture, TestBed } from '@angular/core/testing'; - -import { SliderItemComponent } from './slider-item.component'; - -describe('SliderItemComponent', () => { - let component: SliderItemComponent; - let fixture: ComponentFixture; - - beforeEach(async () => { - await TestBed.configureTestingModule({ - declarations: [SliderItemComponent], - }).compileComponents(); - - fixture = TestBed.createComponent(SliderItemComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/src/app/shared/cookie-consent/cookie-consert.service.spec.ts b/src/app/shared/cookie-consent/cookie-consert.service.spec.ts deleted file mode 100644 index 20a74d6..0000000 --- a/src/app/shared/cookie-consent/cookie-consert.service.spec.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { TestBed } from '@angular/core/testing'; - -import { CookieConsertService } from './cookie-consert.service'; - -describe('CookieConsertService', () => { - let service: CookieConsertService; - - beforeEach(() => { - TestBed.configureTestingModule({}); - service = TestBed.inject(CookieConsertService); - }); - - it('should be created', () => { - expect(service).toBeTruthy(); - }); -}); diff --git a/src/app/shared/directive/clicked-outside/clicked-outside.directive.spec.ts b/src/app/shared/directive/clicked-outside/clicked-outside.directive.spec.ts deleted file mode 100644 index 7514847..0000000 --- a/src/app/shared/directive/clicked-outside/clicked-outside.directive.spec.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { ClickedOutsideDirective } from './clicked-outside.directive'; - -describe('ClickedOutsideDirective', () => { - it('should create an instance', () => { - const directive = new ClickedOutsideDirective(); - expect(directive).toBeTruthy(); - }); -}); diff --git a/src/app/shared/service-worker/update.service.spec.ts b/src/app/shared/service-worker/update.service.spec.ts deleted file mode 100644 index 058dbb8..0000000 --- a/src/app/shared/service-worker/update.service.spec.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { TestBed } from '@angular/core/testing'; - -import { UpdateService } from './update.service'; - -describe('UpdateService', () => { - let service: UpdateService; - - beforeEach(() => { - TestBed.configureTestingModule({}); - service = TestBed.inject(UpdateService); - }); - - it('should be created', () => { - expect(service).toBeTruthy(); - }); -}); diff --git a/tsconfig.spec.json b/tsconfig.spec.json deleted file mode 100644 index e6a5127..0000000 --- a/tsconfig.spec.json +++ /dev/null @@ -1,10 +0,0 @@ -/* To learn more about this file see: https://angular.io/config/tsconfig. */ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "outDir": "./out-tsc/spec", - "types": ["jasmine"] - }, - "files": ["src/test.ts", "src/polyfills.ts"], - "include": ["src/**/*.spec.ts", "src/**/*.d.ts"] -}