Skip to content

Commit

Permalink
test: view のテストを Testing Library を使って書き換え
Browse files Browse the repository at this point in the history
  • Loading branch information
kasaharu committed Apr 20, 2024
1 parent b59a622 commit 4861b28
Showing 1 changed file with 6 additions and 15 deletions.
Original file line number Diff line number Diff line change
@@ -1,22 +1,13 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';

import { render } from '@testing-library/angular';
import { Hero } from '../../../../domain/hero';
import { LyHeroSearchComponent } from './ly-hero-search.component';

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

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

fixture = TestBed.createComponent(LyHeroSearchComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', async () => {
const heroes: Hero[] = [];
const { fixture } = await render(LyHeroSearchComponent, { componentInputs: { heroes } });
const component = fixture.componentInstance;

it('should create', () => {
expect(component).toBeTruthy();
});
});

0 comments on commit 4861b28

Please sign in to comment.