Skip to content

Commit 0d9e566

Browse files
committed
refactor(sidebar-nav-divider): signal inputs, test
1 parent 57eaa01 commit 0d9e566

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

projects/coreui-angular/src/lib/sidebar/sidebar-nav/sidebar-nav-divider.component.spec.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ describe('SidebarNavDividerComponent', () => {
1010
beforeEach(waitForAsync(() => {
1111
TestBed.configureTestingModule({
1212
imports: [SidebarNavDividerComponent]
13-
})
14-
.compileComponents();
13+
}).compileComponents();
1514
}));
1615

1716
beforeEach(() => {
@@ -21,7 +20,7 @@ describe('SidebarNavDividerComponent', () => {
2120
item = {
2221
divider: true
2322
};
24-
component.item = item;
23+
fixture.componentRef.setInput('item', item);
2524

2625
fixture.detectChanges();
2726
});
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
import { Component, Input } from '@angular/core';
1+
import { Component, input } from '@angular/core';
2+
import { INavData } from './sidebar-nav';
23

34
@Component({
45
selector: 'c-sidebar-nav-divider',
56
template: ``
67
})
78
export class SidebarNavDividerComponent {
8-
@Input() item: any;
9+
readonly item = input<INavData>();
910
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy