Skip to content

Commit

Permalink
test(playlist-info): add mock for ActivatedRoute in component tests
Browse files Browse the repository at this point in the history
  • Loading branch information
4gray committed Dec 16, 2024
1 parent 113f6dc commit 0bdb06c
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
import { MAT_DIALOG_DATA, MatDialogModule } from '@angular/material/dialog';
import { MatFormFieldModule } from '@angular/material/form-field';
import { MatSnackBar, MatSnackBarModule } from '@angular/material/snack-bar';
import { ActivatedRoute } from '@angular/router';
import { Actions } from '@ngrx/effects';
import { provideMockActions } from '@ngrx/effects/testing';
import { MockStore, provideMockStore } from '@ngrx/store/testing';
Expand Down Expand Up @@ -49,6 +50,9 @@ describe('PlaylistInfoComponent', () => {
provideMockActions(actions$),
MockProvider(NgxIndexedDBService),
MockProvider(TranslateService),
MockProvider(ActivatedRoute, {
snapshot: { params: { id: '' } } as any,
}),
],
}).compileComponents();
}));
Expand Down

0 comments on commit 0bdb06c

Please sign in to comment.