Skip to content

Commit

Permalink
chore: updates
Browse files Browse the repository at this point in the history
  • Loading branch information
rustygreen committed Mar 26, 2024
1 parent 75c4a41 commit 1460f0c
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -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', () => {
Expand All @@ -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);
Expand Down
7 changes: 5 additions & 2 deletions libs/core/src/lib/set-password/set-password.component.spec.ts
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
2 changes: 1 addition & 1 deletion libs/core/src/lib/supabase.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export class SupabaseService {
readonly user = new BehaviorSubject<User | null>(null);
readonly userDisplayName = new BehaviorSubject<string>('');
readonly userSubheading = new BehaviorSubject<string>('');
readonly userProfile = new BehaviorSubject<any>(null);
readonly userProfile = new BehaviorSubject<unknown>(null);
readonly signedIn = new BehaviorSubject<boolean>(false);
readonly loading = new BehaviorSubject<boolean>(true);
readonly clientReady: Promise<SupabaseClient>;
Expand Down
1 change: 1 addition & 0 deletions libs/primeng/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
7 changes: 1 addition & 6 deletions libs/primeng/src/lib/user-avatar/user-avatar.component.ts
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 1460f0c

Please sign in to comment.