Skip to content

Commit

Permalink
chore: fixes failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
rustygreen committed Mar 27, 2024
1 parent 5d49d17 commit adce7dc
Showing 1 changed file with 21 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
// Angular.
import { RouterTestingModule } from '@angular/router/testing';
import { ComponentFixture, TestBed } from '@angular/core/testing';

// ng-supabase.
import { SupabaseConfig, SupabaseService } from '@ng-supabase/core';

// Local.
import { ActiveUserAvatarButtonComponent } from './active-user-avatar-button.component';

describe('ActiveUserAvatarButtonComponent', () => {
Expand All @@ -7,7 +14,20 @@ describe('ActiveUserAvatarButtonComponent', () => {

beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [ActiveUserAvatarButtonComponent],
imports: [RouterTestingModule, ActiveUserAvatarButtonComponent],
providers: [
{
provide: SupabaseConfig,
useValue: new SupabaseConfig({
apiKey: 'some-key',
apiUrl: 'mock://localhost/supabase',
}),
},
{
provide: SupabaseService,
useValue: {},
},
],
}).compileComponents();

fixture = TestBed.createComponent(ActiveUserAvatarButtonComponent);
Expand Down

0 comments on commit adce7dc

Please sign in to comment.