From adce7dca6d8aff17b9537eaac6addb4f4d1715eb Mon Sep 17 00:00:00 2001 From: Rusty Green Date: Tue, 26 Mar 2024 20:02:50 -0400 Subject: [PATCH] chore: fixes failing test --- ...ctive-user-avatar-button.component.spec.ts | 22 ++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/libs/primeng/src/lib/active-user-avatar-button/active-user-avatar-button.component.spec.ts b/libs/primeng/src/lib/active-user-avatar-button/active-user-avatar-button.component.spec.ts index e9b24bb..6719427 100644 --- a/libs/primeng/src/lib/active-user-avatar-button/active-user-avatar-button.component.spec.ts +++ b/libs/primeng/src/lib/active-user-avatar-button/active-user-avatar-button.component.spec.ts @@ -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', () => { @@ -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);