Skip to content

Commit

Permalink
test(unit): adjustment specs imports
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasferreiralimax committed Jul 4, 2024
1 parent 3fd5417 commit 66808f1
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions src/app/app.component.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@ describe('AppComponent', () => {
expect(app).toBeTruthy();
});

it(`should have the 'angular-techs-logos' title`, () => {
it(`should have the 'angular-techs-logos'`, () => {
const fixture = TestBed.createComponent(AppComponent);
const app = fixture.componentInstance;
expect(app.title).toEqual('angular-techs-logos');
expect(app.codeString).toEqual('<angular-techs-logos />');
});

it('should render title', () => {
const fixture = TestBed.createComponent(AppComponent);
fixture.detectChanges();
const compiled = fixture.nativeElement as HTMLElement;
expect(compiled.querySelector('h1')?.textContent).toContain('Hello, angular-techs-logos');
expect(compiled.querySelector('h1')?.textContent).toContain('angular-techs-logos');
});
});
3 changes: 1 addition & 2 deletions src/app/components/app-footer/app-footer.component.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';

import { AppFooterComponent } from './app-footer.component';

describe('AppFooterComponent', () => {
Expand All @@ -8,7 +7,7 @@ describe('AppFooterComponent', () => {

beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [ AppFooterComponent ]
imports: [ AppFooterComponent ]
})
.compileComponents();
}));
Expand Down
11 changes: 6 additions & 5 deletions src/app/components/app-version/app-version.component.spec.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';

import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import { AppVersionComponent } from './app-version.component';

describe('AppVersionComponent', () => {
let component: AppVersionComponent;
let fixture: ComponentFixture<AppVersionComponent>;

beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [ AppVersionComponent ]
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
imports: [ AppVersionComponent ]
})
.compileComponents();
}));

beforeEach(() => {
fixture = TestBed.createComponent(AppVersionComponent);
component = fixture.componentInstance;
fixture.detectChanges();
Expand Down
2 changes: 1 addition & 1 deletion src/app/components/darkmode/darkmode.component.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ describe('DarkmodeComponent', () => {

beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [ DarkmodeComponent ]
imports: [ DarkmodeComponent ]
})
.compileComponents();

Expand Down

0 comments on commit 66808f1

Please sign in to comment.