migrate firebase db

This commit is contained in:
2026-03-09 21:50:49 +01:00
parent a569c070c5
commit b6c2fe1645
18 changed files with 143 additions and 62 deletions

View File

@@ -1,24 +1,20 @@
import {TestBed} from '@angular/core/testing';
import {SongDataService} from './song-data.service';
import {AngularFirestore} from '@angular/fire/compat/firestore';
import {firstValueFrom, of} from 'rxjs';
import {DbService} from '../../../services/db.service';
describe('SongDataService', () => {
const songs = [{title: 'title1'}];
const angularFirestoreCollection = {
valueChanges: () => of(songs),
};
const mockAngularFirestore = {
collection: () => angularFirestoreCollection,
const mockDbService = {
col$: () => of(songs),
};
beforeEach(
() =>
void TestBed.configureTestingModule({
providers: [{provide: AngularFirestore, useValue: mockAngularFirestore}],
providers: [{provide: DbService, useValue: mockDbService}],
})
);