update tslint -> eslint

This commit is contained in:
2021-05-21 20:17:26 +02:00
parent 80260df71f
commit a195fafa6b
252 changed files with 3080 additions and 2420 deletions

View File

@@ -5,37 +5,35 @@ import {AngularFirestore} from '@angular/fire/firestore';
import {of} from 'rxjs';
describe('SongDataService', () => {
const songs = [
{title: 'title1'}
];
const songs = [{title: 'title1'}];
const angularFirestoreCollection = {
valueChanges: () => of(songs)
valueChanges: () => of(songs),
};
const mockAngularFirestore = {
collection: () => angularFirestoreCollection
collection: () => angularFirestoreCollection,
};
beforeEach(() => TestBed.configureTestingModule({
providers: [
{provide: AngularFirestore, useValue: mockAngularFirestore}
]
}));
beforeEach(
() =>
void TestBed.configureTestingModule({
providers: [{provide: AngularFirestore, useValue: mockAngularFirestore}],
})
);
it('should be created', () => {
const service: SongDataService = TestBed.get(SongDataService);
expect(service).toBeTruthy();
const service: SongDataService = TestBed.inject(SongDataService);
void expect(service).toBeTruthy();
});
it('should list songs', waitForAsync(() => {
const service: SongDataService = TestBed.get(SongDataService);
service.list$().subscribe(s => {
expect(s).toEqual([
{title: 'title1'}
] as any);
}
);
}));
it(
'should list songs',
waitForAsync(() => {
const service: SongDataService = TestBed.inject(SongDataService);
service.list$().subscribe(s => {
void expect(s[0].title).toEqual('title1');
});
})
);
});