update tslint -> eslint
This commit is contained in:
@@ -9,24 +9,21 @@ describe('SongListComponent', () => {
|
||||
let component: SongListComponent;
|
||||
let fixture: ComponentFixture<SongListComponent>;
|
||||
|
||||
const songs = [
|
||||
{title: 'title1'}
|
||||
];
|
||||
const songs = [{title: 'title1'}];
|
||||
|
||||
const mockSongService = {
|
||||
list: () => of(songs)
|
||||
list: () => of(songs),
|
||||
};
|
||||
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [SongListComponent],
|
||||
providers: [
|
||||
{provide: SongService, useValue: mockSongService}
|
||||
],
|
||||
schemas: [NO_ERRORS_SCHEMA]
|
||||
beforeEach(
|
||||
waitForAsync(() => {
|
||||
void TestBed.configureTestingModule({
|
||||
declarations: [SongListComponent],
|
||||
providers: [{provide: SongService, useValue: mockSongService}],
|
||||
schemas: [NO_ERRORS_SCHEMA],
|
||||
}).compileComponents();
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
);
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(SongListComponent);
|
||||
@@ -35,13 +32,11 @@ describe('SongListComponent', () => {
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
void expect(component).toBeTruthy();
|
||||
});
|
||||
|
||||
it('should read songs from SongService', fakeAsync(() => {
|
||||
tick();
|
||||
expect(component.songs$).toEqual([
|
||||
{title: 'title1'}
|
||||
] as any);
|
||||
void expect(component.songs$).toEqual([{title: 'title1'}]);
|
||||
}));
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user