diff --git a/libs/core/src/lib/active-user-avatar-button/active-user-avatar-button.component.spec.ts b/libs/core/src/lib/active-user-avatar-button/active-user-avatar-button.component.spec.ts index e9b24bb..6297cd9 100644 --- a/libs/core/src/lib/active-user-avatar-button/active-user-avatar-button.component.spec.ts +++ b/libs/core/src/lib/active-user-avatar-button/active-user-avatar-button.component.spec.ts @@ -1,4 +1,10 @@ +// Angular. +import { RouterTestingModule } from '@angular/router/testing'; import { ComponentFixture, TestBed } from '@angular/core/testing'; + +// Local. +import { SupabaseConfig } from '../supabase-config'; +import { SupabaseService } from '../supabase.service'; import { ActiveUserAvatarButtonComponent } from './active-user-avatar-button.component'; describe('ActiveUserAvatarButtonComponent', () => { @@ -7,7 +13,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); diff --git a/libs/core/src/lib/set-password/set-password.component.spec.ts b/libs/core/src/lib/set-password/set-password.component.spec.ts index d19fd43..646d40c 100644 --- a/libs/core/src/lib/set-password/set-password.component.spec.ts +++ b/libs/core/src/lib/set-password/set-password.component.spec.ts @@ -1,8 +1,11 @@ +// Angular. +import { RouterTestingModule } from '@angular/router/testing'; import { ComponentFixture, TestBed } from '@angular/core/testing'; -import { SetPasswordComponent } from './set-password.component'; + +// Local. import { SupabaseConfig } from '../supabase-config'; -import { RouterTestingModule } from '@angular/router/testing'; import { SupabaseService } from '../supabase.service'; +import { SetPasswordComponent } from './set-password.component'; describe('SetPasswordComponent', () => { let component: SetPasswordComponent; diff --git a/libs/core/src/lib/supabase.service.ts b/libs/core/src/lib/supabase.service.ts index a1e8485..38d2a2b 100644 --- a/libs/core/src/lib/supabase.service.ts +++ b/libs/core/src/lib/supabase.service.ts @@ -26,7 +26,7 @@ export class SupabaseService { readonly user = new BehaviorSubject(null); readonly userDisplayName = new BehaviorSubject(''); readonly userSubheading = new BehaviorSubject(''); - readonly userProfile = new BehaviorSubject(null); + readonly userProfile = new BehaviorSubject(null); readonly signedIn = new BehaviorSubject(false); readonly loading = new BehaviorSubject(true); readonly clientReady: Promise; diff --git a/libs/primeng/package.json b/libs/primeng/package.json index c06927c..156ff01 100644 --- a/libs/primeng/package.json +++ b/libs/primeng/package.json @@ -29,6 +29,7 @@ "peerDependencies": { "@angular/common": ">=17.0.0", "@angular/core": ">=17.0.0", + "@angular/router": ">=17.0.0", "primeng": ">=17.3.0", "primeflex": ">=3.3.1", "@angular/forms": ">=17.0.0", diff --git a/libs/primeng/src/lib/user-avatar/user-avatar.component.ts b/libs/primeng/src/lib/user-avatar/user-avatar.component.ts index 5a719f5..cfa981f 100644 --- a/libs/primeng/src/lib/user-avatar/user-avatar.component.ts +++ b/libs/primeng/src/lib/user-avatar/user-avatar.component.ts @@ -1,11 +1,6 @@ // Angular. import { CommonModule } from '@angular/common'; -import { - ChangeDetectionStrategy, - Component, - Input, - signal, -} from '@angular/core'; +import { Input, Component, ChangeDetectionStrategy } from '@angular/core'; // 3rd party. import { AvatarModule } from 'primeng/avatar'; diff --git a/package.json b/package.json index 09b0844..f97fa51 100644 --- a/package.json +++ b/package.json @@ -13,6 +13,7 @@ "script": "ts-node -r tsconfig-paths/register --project scripts/tsconfig.json", "stylelint": "stylelint", "start:demo": "nx serve --project=demo", + "lint": "nx lint", "lint:ci": "npm run lint:all", "lint:all": "nx run-many -t lint && stylelint -- **/*.scss", "lint:style": "stylelint -- **/*.scss",